Saturday, February 19, 2011

How to take MySQL database dumps in Windows

If we want to take mysqldump in windows, then use the following syntax.

path to mysqldump execute file -h hostname -u username -ppassword > path to .sql file
For example if you installed WAMP/XAAMP server in E: drive then the mysqldump syntax will follows like below.

E:\wamp\bin\mysql\mysql5.1.36\bin>mysqldump -u root news_admin > E:/anji.sql

To restore mysql dump in the windows then use the following syntax.
Example:
E:\wamp\bin\mysql\mysql5.1.36\bin>mysql -u root newsd < E:/anji.sql

No comments:

Post a Comment