views:

4830

answers:

5

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

+6  A: 

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\bin
mysql.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...

Wadih M.
That helped a lot. It turned out the exact syntax from the Windows command line was: "mysql --user=user_name --password=the_password db_name"
Nathan Long
Also thanks for the comment about mysqldump - I was under the mistaken impression you access it from the mysql command line instead of the windows command line.
Nathan Long
No problem! I use those tools regularly.
Wadih M.
A: 

if i go for sql prompt by cd d:\xampp\mysql\bin\mysql.exe

but i get only 2 tables which is bydefault mainly test,information_schema and i have 8 more tables. where are those tables;?

A: 

thanks a lot.....

Nazib
This should be a comment rather that an answer
abatishchev
A: 

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

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