How to repair crashed tables in MySQL if auto repair fails

Here is what you should do if a table crashes and auto repair after mysql restart fails. Open a terminal / command line utility If crash is on remote server you will need to ssh first service mysql stop cd /var/lib/mysql/{your database name} myisamchk -r {table name} – recovering (with sort) MyISAM-table ‘{table name}’ Data records: ...

migrate/copy mysql databases from one machine to another

I am currently on Mac OS X( Snow leopard ) and have installed mysql using macports. I wanted to copy my databases to another machine Mac OS X ( Lion ) to avoid creating new db’s from fresh. Here are the instructions for the same. Important: Information about databases is stored in below folder /opt/local/var/db/mysql5 ...