Category Archives: System

Topics dealing with Windows, Linux and equal.

MySQL Datenbank importieren exportieren in der Konsole

Manchmal macht PhpMyAdmin einem wirklich Sorgen. Etwa weil man Datenbanken (DB) nicht importieren kann, weil sie zu groß sind.

In diesem Fall wechselt man in die Konsole und importiert die DB per mysql.

Unter xampp und auf Linux heißt der Befehl:

/opt/lampp/bin/mysql
-h'localhost' -u'username1' -p'passwort1' -D  dbname1 < db.sql

Bei Problemen mit UTF-8-Datenbanken schreibt man:

/opt/lampp/bin/mysql
-h'localhost' -u'username2' -p'passwort2'
--default_character_set utf8 -D  dbname2 < db.sql

Und für den Export nutzt man:

/opt/lampp/bin/mysqldump -a --add-drop-table
-h'localhost' -u'username3' -p'passwort3' dbname3 > db_2011.10.19.sql

.htaccess on xampp for Windows

You need .htaccess on xampp for Windows.

Open a command line. Write there

C:\xampp\apache\bin>htpasswd -c -m -b c:\xampp\htdocs\.htpasswd username password

Create a .htaccess file and fill in it

AuthType Basic
AuthName "Access for restricted area"
AuthUserFile c:/xampp/htdocs/.htpasswd
require user username

Copy the .htaccess file to the directory you need the secured area.

Difference to your settings are: The path to the apache bin folder or htdocs folder on your xampp installation could be different. Change the above mentioned paths to your need.

The words “username” and “password” are only synonyms for real terms.

Symbolic links in Windows 7

How to create symbolic links in Windows 7?

Open command line in designated directory. Write there:

mklink /J "typo3_src" "../typo3_src-4.4.2"
mklink /J "typo3" "typo3_src/typo3"
mklink /J "t3lib" "typo3_src/t3lib"

So you get a symbolic link from typo3_src to directory typo3_src-4.4.2 lying in the directory above.

Edit: 28.04.2016

Seems it has changed since I first wrote this post. In recent TYPO3 and Win 7 Professional this has changed or let me say, didn’t work how it is stated above. I had to give the complete path, also it has changed in TYPO3 e.g. version 7, that you don’t need to link the lib directory, but the index.php.

In the install description coming with the source of TYPO3 is written:

mklink /D C:\...\example.com\typo3_src C:\...\typo3_src-7.6.x
mklink C:\...\example.com\index.php C:\...\typo3_src-7.6.x\index.php

Even you get managed that file symbolic links work in your instance the core update through Install tool won’t work at all on Windows systems.

Thus that worked for me:

mklink /J "c:/xampp/htdocs/reisen.local/typo3_src" "c:/xampp/myTmp/typo3_sources/typo3_src-7.6.6"
mklink /J "c:/xampp/htdocs/reisen.local/typo3" "c:/xampp/myTmp/typo3_sources/typo3_src-7.6.6/typo3"

Afterwards I copied index.php from source root into vhost root directory.