MySQL Tutorial

Backup

  • mysqldump creates a dump file of SQL statements.

  • mysqlhotcopy copies the data files to a backup location.

  • BACKUP TABLE copies the data file for a table to a backup location.

  • You can manually back up by locking and flushing the tables and then copying the files.

Restoration

  • Reload dump files from mysqldump .

  • Copy back data files from mysqlhotcopy or a manual backup.

  • Restore from BACKUP TABLE with RESTORE TABLE .

  • Re-execute operations since the backup from the binary log.

Checking and Repairing Tables

  • Check tables with CHECK TABLE , myisamchk , isamchk , or mysqlcheck .

  • Repair tables with REPAIR TABLE , myisamchk , isamchk , or mysqlcheck .

  • Don't use myisamchk while the server is being used.

Категории