Search
| Backing Up and Restoring MySQL Database |
|
|
|
| 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]
|
| Last Updated on Sunday, 05 December 2010 13:18 |





