0

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.

3 Answers 3

4

5GB is no problem.

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

then on the new host

mysql -u user -p < MyDB1.sql

1
  • 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, 2011 at 4:43
2

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.

-2

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

1
  • That's only the right answer if you have MyISAM tables... you did not specify.
    – HTTP500
    Jul 27, 2011 at 22:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .