Sunday, April 26, 2009

How to dump sql data base into a file

Here are the steps to dump sql data base into a .sql file
1. Go to the bin folder of the mysql, which might be (C:/xampp/mysql/bin if you are using xampp)
2. Type the following command mysqldump -u root -p --database name of the database > file to ouput.sql

Thursday, April 23, 2009

How to use MySQL command line in XAMPP

Here are the step by step procedure to use MySQL Command line in XAMPP

Before doing this make sure that mysql is installed on computer and its running successfully.
1. Go to start menu -> Run -> then type cmd to open command line
2. Go to the home directory of XAMPP (type cd C:\xampp in command line)
3. Go to the mysql bin directory (type cd mysql\bin in command line)
4. Now type mysql.exe --user=root --password = password (if you have changed the password)
5. Type mysql.exe --user=root --password = (if you didn't change the password)
6. If you properly do all the above steps then you will get mysql> in command line
7. Now go ahead with all your data base related quires to interact with your mysql server