How can I access the MySQL command line with XAMPP for Windows? How can I access the MySQL command line with XAMPP for Windows? windows windows

How can I access the MySQL command line with XAMPP for Windows?


Your MySQL binaries should be somewhere under your XAMPP folder. Look for a /bin folder, and you'll find the mysql.exe client around. Let's assume it is in c:\xampp\mysql\bin, then you should fireup a command prompt in this folder.

That means, fire up "cmd", and type:

cd c:\xampp\mysql\binmysql.exe -u root --password

If you want to use mysqldump.exe, you should also find it there.

Log into your mysql server, and start typing your commands.

Hope it helps...


On the Mac, or at least on my Mac using a default install, I accessed it at:

/Applications/xampp/xamppfiles/bin/mysql -uroot -p


For Linux:

/opt/lampp/bin/mysql -u root -p

To use just 'mysql -u root -p' command then add '/opt/lampp/bin' to the PATH of the environment variables.