September 28th, 1999, 06:10 AM
I want to ask how to backup an existing
mySQL database ?
thanks for help !
September 28th, 1999, 08:30 AM
You can use mysqldump. Go to your mysql/bin/ directory and type this:
mysqldump -u username -ppassword your_db_name > /path/to/dir/filename
This will create a text file containing all the commands to recreate the tables in your_db_name and commands to insert the data into the tables.
You can recover by dropping all tables from the db (or dropping the db itself, then recreating it with create database your_db_name). Then, from the OS command line issue:
mysql -u username -ppassword < /path/to/dir/filename