Categories
Databases MySQL programming Quick Tips servers

MySqlDump export and MySQL import

To export data as a backup you can’t beat mysqldump.

# mysqldump -u username database > database_2007-05-14.sql

Then to restore a database you would use:

# mysql -u username -p database < database_2007-05-14.sql

It doesn’t get any easier than that!

By Adam

Speaker, author, consultant, OSS contributor, SoFloPHP UG and SunshinePHP Conf organizer, RunGeekRadio Host, Long distance runner and ultra marathoner.