Changing Database in MySQL via command prompt

Usually in Xampp mysql would be in mysql/bin

you can access SQL database through PhpmyAdmin and also through Command Prompt

To access MySQL through Command Prompt

a)First access the mysql/bin folderĀ  via command Prompt

b)Then at command Prompt type

mysql.exe -u ganesh -p

Enter password:

c)It would ask for password.When you type the password it would not be shown at the command prompt

d)Once the password is entered and if it is correct.. it would take you to MySQL prompt

To change the default Database you should use this command


mysql>USE DATABASE1;

where “DATABASE1″ is a database

This entry was posted on Monday, January 19th, 2009 at 4:30 pm and is filed under SQL. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Post a Comment