Subscribe to Tutorial Feed

Flash and PHP Bible

The Flash and PHP Bible has been released! The book can be found on Amazon or wherever fine books are sold in your area.

The Flash and PHP Bible has a forum for quick support.

Scriptplayground » tutorials » linux » [Snippet] Backup and Restore MySQL from command line

[Snippet] Backup and Restore MySQL from command line

How to quickly backup a MySQL database using the command line.

Here is how to quickly backup a MySQL database using the command line.

Start by opening Terminal (Mac) or Putty (Win) and follow these commands.

Backing up a database

mysqldump -h hostname -u user --password=pass databasename > filename

Restoring a database

mysql -h hostname -u user --password=pass databasename < filename

Replace the hostname, user, pass, databasename and filename with the values for your own server.

Reposted from mkeefeDESIGN Blog

Follow Scriptplayground on Twitter (@scriptplay)

Comments: [Snippet] Backup and Restore MySQL from command line

No Comments have been made. Wanna be the first?
Add a comment
The ability to add new comments has been disabled in this archived version.

Loading
Main | Tutorials | Articles