0

I've had a hard drive crash on me and unfortunately I do not have .sql dumps available to restore my databases. Though I do have a very recent back up of my entire file system.

I've grabbed the files from /usr/local/var/mysql/ from my back up and placed it in my fresh reinstall at the same location.

I can see all my databases when I use show databases; via the command line. I can also select a database using use <database>;. However, when I try to access any table on the database I see: ERROR 1146 (42S02): Table 'database.table' doesn't exist.

Thankfully it's only happening for a few less important databases but ideally I'd like to restore them fully.

Thanks

Allan Thomas
  • 3,481
  • 5
  • 26
  • 29

2 Answers2

0

did you restarted mysql daemon after overwrite? Also check this thread: https://superuser.com/questions/165575/import-or-restore-mysql-databases-from-var-directory

Community
  • 1
  • 1
Vahid Farahmand
  • 2,528
  • 2
  • 14
  • 20
0

It's not clear from your description if you've copied all your files from /usr/local/var/mysql/ . You will need different sets of files depending on whether the tables in your databases were MyISAM or InnoDB storage engines. Please check out this comment: Restoring MySQL database from physical files

Community
  • 1
  • 1