Mysql command line in Windows

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Mysql command line in Windows

Postby Scottty » 25. December 2006 20:31

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
Scottty
 
Posts: 5
Joined: 30. November 2006 06:24

Postby Dave_L » 27. December 2006 15:36

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.
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby dinhaan » 03. January 2007 16:28

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.
dinhaan
 
Posts: 9
Joined: 03. January 2007 16:16

Postby Dave_L » 03. January 2007 16:50

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
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby dinhaan » 03. January 2007 18:30

Thank you so much Dave_L !
MySQL now can run in command line.
dinhaan
 
Posts: 9
Joined: 03. January 2007 16:16

Postby dinhaan » 05. January 2007 08:39

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 !!!
dinhaan
 
Posts: 9
Joined: 03. January 2007 16:16


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 44 guests