Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

The machine died, but I have the drive, but I can't exactly export the databases because there's no machine to run mysql on.

I have a new machine with a ubuntu 10.10 install (the older was was 9.10) and I would be happy to just copy /var/lib/mysql over but when I tried to restart mysql after copying the directory tree of, I got a init: mysql post-start process (1511) terminated with status 1

Is there an easy way to move the installation without having to unload and load all the data?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

check the file permissions. What is the exact error that is in the .err file in /var/lib/mysql?

share|improve this answer
    
the tipoff here was that there was a mysql/err* file. I was looking in syslog. THanks. –  Stu Oct 27 '10 at 1:02

I tried something similar but with postgresql database. I copied the data files from one machine to another. Then, I got an error when trying to start the database server.

Later, I found out that the reason was different hardware. One machine has 32-bit system installed, but the other has 64-bit system.

Check your hardware specs for both machines. You may have something similar. Also, check the files/folders permissions.

share|improve this answer
    
good to know, it's the same machine actually. :-) –  Stu Oct 26 '10 at 21:25

Copying the database files over should work - are you sure you set the files to the correct owner and chmod? MySQL is quite picky about this - you need to use chmod 600 on all DB files and have the mysql user as the owner.

share|improve this answer
    
will check this out thanks. –  Stu Oct 26 '10 at 21:20

Your Answer

 
discard

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.