Posted by: prajapatinilesh | January 21, 2008

Access MySQL Command Line in XAMPP/XLMPP

XLMPP –> XLMPP is XAMPP, but instead of Apache, it uses lighttpd.

This is from version 1.6.0a of XAMPP and lighttpd is 1.4.13 from here.

There are two ways to do it. Both are basically the same, but one just makes it a lot easier. We’ll go over the harder one first.

First Method:

Start the command prompt, and cd to the xampp directory. It’ll usually be something like:
cd ../../Program Files/xampp
if you used the installer and default install location.

Once in there, cd to the mysql bin directory.
cd mysql/bin

Now, run the command:
mysql.exe --user=root --password=
And the MySQL command line will start. If you’ve changed the username or password of the MySQL user, you need to change the –user= and –password= accordingly.

Second method:

Basically the same way as before, but we’ll create a batch file to make it easier. First, create a file called mysql_command.bat in the XAMPP directory.Edit this file with Notepad or any text editor, and paste in this:

@echo offecho Starting MySQL command line...

mysql\bin\mysql.exe --user=root --password=


Save it, and change the –user= and –password= if you’ve changed the user or password.

Now, run mysql_command.bat and a command prompt will show up with the MySQL command line running.

Orignal post on:  🙂



  1. It would be a great idea to credit this information as originally having been posted at

  2. Thanks for the info!

  3. very useful, Thanks a lot.

  4. It’s working.
    Thanks a ton for both 🙂

  5. This piece of writing will help the internet visitors for building
    up new web site or even a weblog from start to end.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: