Changes

Backup The MySQL Database

354 bytes added, 03:17, 22 January 2014
The following lines were added (+) and removed (-):
   mysqldump --opt payrolldb --lock-tables -p > payrolldb_backup.sql   mysqldump --opt payroll --lock-tables -p > payroll_backup.sqlIn this exampleIn this example the payroll table is being dumped to a backup file.  It is possible to dump several databases with one command.   mysqldump --databases payroll accounting --lock-tables -p > business_backup.sqlTo restore a single table to the database.  mysql -p payroll < payroll_backup.sqlTo restore multiple tables to the database.  mysql -p < business_backup.sql
Bureaucrat, administrator
14,711
edits