Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

A client ask me to migrate his MySQL DB: The server doesn't have free space and it also has a very big table that is broken, so I can't dump it.

I can't REPAIR it because of lacking of free space.

Question : Is there a way to physically move MySQL DB data files to another server and use them for the "new" MySQL ?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Here is what you can do:

  • Old DB Server : 10.1.2.30
  • New DB Server : 10.1.2.40

STEP 01) On the Old Server, service mysql stop

STEP 02) On the Old Server, rsync -av --progress /var/lib/mysql root@10.1.2.40:/var/lib/mysql

STEP 03) On the New Server, chown -R mysql:mysql /var/lib/mysql

STEP 04) On the New Server, service mysql start

Make sure /var/lib/mysql on the New Server is on a much bigger disk mount

share|improve this answer
    
Ok, I'll try that, I was already donwloading those files from /var/lib/mysql so when its finished I just have to upload that to New DB Server. Thanks. –  Mariano Argañaraz Mar 11 '13 at 4:05

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.