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

I have some MySQL databases,for example:

CREATE DATABASE MyDB1;
CREATE DATABASE MyDB2;
CREATE DATABASE MyDB3;
CREATE DATABASE MyDB4;

each one is databased used by another client. MyDB1 started to use too much resources and needs dedicated server. I need to transfer only one database(its ok if that database will be unavalible(better if it will be avalible all time) other databases should be avalible all time. Is free version of MySQL enough? Each database size is near 5 GB.

share|improve this question

3 Answers 3

5GB is no problem.

mysqldump -u user -p --opt MyDB1 > MyDB1.sql

then on the new host

mysql -u user -p < MyDB1.sql

share|improve this answer
    
Might want to do a repair/optimize first; will allow it to go faster. for db in $(find /var/lib/mysql -mindepth 1 -maxdepth 1 -type d -exec basename {} \;); do mysqlcheck -or $db; done –  laebshade Jul 22 '11 at 4:43

Dump the database and reload it on a new server. It'll be out of commission while you're moving it, but it shouldn't take very long to dump/reload, and while it's transferring someone can be modifying the app code to point to the new machine.

share|improve this answer
up vote -2 down vote accepted

Right answer was http://dev.mysql.com/doc/refman/5.0/en/mysqlhotcopy.html

share|improve this answer
    
That's only the right answer if you have MyISAM tables... you did not specify. –  HTTP500 Jul 27 '11 at 22:22

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.