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 :
http://www.desilva.biz/mysql/mysqlbak.html
http://www.rlrouse.com/backup-restore-mysql.html

Advertisements

3 thoughts on “Backing Up And Restoring MySQL Database

ใส่ความเห็น

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

WordPress.com Logo

You are commenting using your WordPress.com 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 / เปลี่ยนแปลง )

Google+ photo

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

Connecting to %s