Backing Up And Restoring MySQL Database

Backing Up And Restoring MySQL Database

Backing up your MySQL database
mysqldump –add-drop-table -u username -p dbname > /var/www/dbname.bak.dump

Restoring your MySQL database

mysql -u username -p dbname < /var/www/dbname.bak.dump
Remember to delete the file after use
Please remember to delete this file (or move this file up out of your WWW root) as soon as you’re done using it because really, ANYONE, could now download it if it’s left on your WWW root.

Reference :


3 thoughts on “Backing Up And Restoring MySQL Database


Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  เปลี่ยนแปลง )

Google+ photo

You are commenting using your Google+ account. Log Out /  เปลี่ยนแปลง )

Twitter picture

You are commenting using your Twitter account. Log Out /  เปลี่ยนแปลง )

Facebook photo

You are commenting using your Facebook account. Log Out /  เปลี่ยนแปลง )


Connecting to %s