Currently Viewing Posts Tagged InnoDB

MySQL Backup and Recovery Methodologies

MySQL is very popular. Many open source or free software use MySQL as their main database engine.
To make our data safe, please remember to backup your data regularly.
There are two methodologies you can use to back up MySQL databases without spending money.
The first is to create a series of SQL statements that rebuild one or more databases. This is usually accomplished via the mysqldump script.
The second is to copy the database files themselves if you can ensure they’re not being changed during the backup. This is currently possible only for MyI*SAM archive tables using the mysqlhotcopy script.
Let’s go into the details of how to back up MySQL database.
Backing up MyISAM tables
The folloing command creates a SQL dump of all MySQL databases in a given instance, locks all tables as necessary, flushes the logs, and writes the name of the current binary log to the output. The second command couses MySQL to switch binary logfiles so that you can back up the logfiles that was used during the backup.

Continue reading “MySQL Backup and Recovery Methodologies”

  • Archives