To export:
In the command prompt go to the bin directory of MySql5.0,and enter the following command.
mysqldump --user="username" --password="userpassword" databasename>filename.sql
If you get an error saying access denied or something like that, replace your username with the default one(root) in the above command .
Thats it , you will get a .sql file in the bin directory with the name mentioned in the command line.
To import:
In order to import , place that .sql file in the bin directory of the other MySql5.0 and enter the following command.
mysql --user="username" --password="userpassword" databasename < filename.sql
Thats it. But do remember to create a database with the name you specify in the command line.
No comments:
Post a Comment