Ok an internal Ubuntu(11.04) box died the other day. We were using it as a webserver and it had a load of mysql databases on it.

I have access to all the files from the /var/lib/mysql dir but I can't figure out how to get them back up and running on another machine. I've tried copying them into a windows mysql install and I can see all the databases in phpmyadmin but no tables.

I've also tried changing the data dir on a mysql install on another ubuntu box (I also changed the apparmor settings) but have had no joy so far...

I just want to get them up to do a data dump... Any links/pointers greatly appreciated.

Regards, Dan

link|improve this question
Where your tables innodb or myisam? – Zoredache Jul 18 '11 at 17:51
feedback

1 Answer

If ServerA is the old Webserver and ServerB is the new machine you want to run MySQL on

Step 1

Install the same version exact version of MySQL you had on ServerA to ServerB

Step 2

Copy /etc/my.cnf from ServerA and put it /etc on ServerB

Step 3

scp /var/lib/mysql from ServerA to same location on ServerB

Step 4

service mysql start

Please let us know what happens !!!

link|improve this answer
You may try running mysql_upgrade. – ghm1014 Jul 18 '11 at 21:45
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.