Sunday, January 16, 2011

Restore MySQL databases from /var/mysql directory

I'm using MySQL 5.1.38 on a clean install of OS X 10.6, where the databases are stored in /usr/local/mysql/data. I have a backup of my old mysql data directory, but the databases were stored in /var/mysql/dbname.

Is there any way I can get my databases back?

  • If MySQL was shutdown cleanly, you should be able to move the files that had been in /var/mysql/dbname into /usr/local/mysql/data while mysql is stopped, and then start mysql and have it pick them up.

    From

0 comments:

Post a Comment