Currently Viewing Posts Tagged MyISAM

Repaire corrupted MyISAM tables

To repare the corrupted MyISAM tables, just cd to the directory that holds the MyISAM datafiles, then run this:

$ myisamchk -r -q table_name

If it doesn’t work, try this command,

$ myisamchk –safe-recover table_name

The above two commands can fix most of the problems of MyISAM tables.

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