Friday, June 8, 2007

Quck and Dirty MySQL Database Backup

Here is a quick and dirty way to backup a database in MySQL, structure and data included. Run this from the command line, NOT the MySQL Client command line:
C:\Program Files\MySQL\MySQL Server 4.1\bin>mysqldump --user=root 
--password=mypassword --databases mydbname
--result-file=c:\mydbname-20070608.sql
Of course, this assumes a Windows environment and that the installation directory is the same.

No comments: