web stats OS X Client Server » Blog Archive » Back up and restore MYSQL databases on OS X



Back up and restore MYSQL databases on OS X


MYSQL

MYSQL is an amazing tool but when something goes wrong it can be a real disaster. Maintaining a good back up and recovery plan is an extremely wise step.

In OS X it is very easy to back up your MYSQL databases.

OS X Terminal

Open a Terminal window (Applications -> Utilities - > Terminal)

Change “DatabaseName” to the name of the database you want to back up and type:

/usr/local/mysql/bin/mysqldump -u root -p DatabaseName > backup.sql

or

mysqldump -u root -p DatabaseName > backup.sql