Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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 !!!

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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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