Go to the mysql\bin directory from a command prompt window.
Type mysqldump <put your database name here> > somefilenameyoulike.SQL
Example. If my database was named eq and the file I wanted it put in was myeqdatabase.sql - I would type:
mysqldump eq > myeqdatabase.sql
(note:check the file and make sure the contents are there and not some error text).
To restore it, you would go into a mysql prompt.
Drop your existing database with: drop database <yourdatabasename>;
Create the database again: create database <yourdatabasename>;
and then source the database with your file...
use <yourdatabasename>;
source <path to somenameyoulike.sql>somenameyoulike.sql
Note, you can always restore it to a newly created database and change your db.ini file to point to the newly created database allowing you to experiment with multiple databases.
For more help, check the mysql documentation on these commands.
- foobar
|