Page 1 of 1

Mysql command line in Windows

PostPosted: 25. December 2006 20:31
by Scottty
Hi

I just installed xampp on Windows XP successfully. I am wondering how you get the command line for mysql in the command prompt. I'm also wondering if the commands for mysql are the the same at the command prompt as they are for the terminal on a Linux platform?

Thanks
Scott

PostPosted: 27. December 2006 15:36
by Dave_L
To run the command-line mysql client, you merely need to specify the correct path to mysql.exe, which depends on where you installed XAMPP.

For example:

> C:\Program Files\xampp\mysql\bin\mysql

If you add that path to your Windows environment variables, then you would only need to type "mysql". I'm not running Windows at the moment, but I think that's done in My Computer >> right-click >> Properties.

Once you're running the mysql client, it should work the same in Windows as in Linux. The other command-line utilities should work too: mysqldump, mysqladmin, etc.

PostPosted: 03. January 2007 16:28
by dinhaan
I tried to follow your recommendations but I could not run the mysql in command lines. The error is like this

ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)

Can anyone help me! I very like to use mysql in command line.
Best regards.

PostPosted: 03. January 2007 16:50
by Dave_L
You need to specify the correct username and password, depending on what you need to access.

Example:

> mysql -u XXXX -p

where XXXX is the username. You'll be prompted for the password.

For more details: http://dev.mysql.com/doc/refman/5.0/en/mysql.html

PostPosted: 03. January 2007 18:30
by dinhaan
Thank you so much Dave_L !
MySQL now can run in command line.

PostPosted: 05. January 2007 08:39
by dinhaan
Hi again !
My PC is belonged to the school LAN so my site can be hosted on the Server in order to be accessed from anywhere. But the MySQL database is not permited to locate on the server. And it should be in my own PC because it is used for another purpose.
Could you know how to build the PHP progam on the server so that it can access and modify an external MySQL database.
Thanks for help !!!