Thursday, September 22, 2011

Import & export database in mysql using command line

MysqlExport :

Go to bin directory
mysqldump –u expuser –p dbname --routines > c:/file.sql
Press enter
Enter Password:
Enter your password
You are done with it

MysqlImport :

Go to bin directory
mysql –uexpuser –p dbname < c:/dile.sql
Press Enter
Enter Password: will appear
Enter your password
You are done with it

Another way is:
Connect with mysql in commond prompt
mysql>Create database dbname;
mysql>User dbname;
mysql>Source file.sql; ExpertusONE_db.sql

No comments:

Post a Comment