| |||||||||||
| | ![]() |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
(#1)
|
| Operations Manager Posts: 7,676 Join Date: Jan 2006 Location: England, UK | Taking (backing up) and restoring MySQL dump files -
21-04-2007, 09:39 PM
Via SSH / MySQL CLI command interface: Dumping a database into a file: Code: mysqldump -u username -ppassword databasename > dumpfilename.sql The file will be saved relative to the location in which you executed the command. So, if you execute the command whilst in the /home/ folder, the dumpfile will be saved to /home/dumpfilename.sql. Note: If you add the parameter "--opt", it will create the database with options to drop existing tables and data when the dump file is imported into a database. Restoring a MySQL dump file: Code: mysql -u username -ppassword databasename < dumpfilename.sql -------------------------------------------------------------------
|
| | |
(#2)
|
(#3)
|
| Operations Manager Posts: 7,676 Join Date: Jan 2006 Location: England, UK |
21-04-2007, 10:37 PM
Thanks for the suggestion, updated!
-------------------------------------------------------------------
|
| | |
![]() |
| Tags |
| backing, dump, files, mysql, restoring |
| Thread Tools | Search this Thread |
| Display Modes | |
| |