Search

Backing Up and Restoring MySQL Database PDF Print E-mail
User Rating: / 0
PoorBest 
Programming - MySQL
Sunday, 05 December 2010 13:02
 
To backup a MySQL database we are using the command 'mysqldump'. The syntax to dump a mysql database is

mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]

[username]- username of your database

[password]- password of your database

[databasename]- your database name

[backupfile.sql]- name of the file to which the backup should be written

 

To restore a mysql database you should use the command mysql. The syntax to restore a mysql database is

mysql -u [username] -p [password] [database_to_restore] < [backupfile.sql]

 



Add this page to your favorite Social Bookmarking websites
 
Last Updated on Sunday, 05 December 2010 13:18
 

Add comment


Security code
Refresh

We have 97 guests online