LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   copy all mysql thngs to another server (https://www.linuxquestions.org/questions/linux-newbie-8/copy-all-mysql-thngs-to-another-server-4175489272/)

byran cheung 12-27-2013 02:40 AM

copy all mysql thngs to another server
 
I have a redhat server , there are mysql databases running on it , I just would like to copy everything of mysql (database , permission , user id ... etc ) to another server .

I search from web , one method is mysqldump database from it and then import to another server , could advise if this method could copy Everything includes permission , user id to another server ?

what I worry is just that I don't not to miss anything when migration. Thanks a lot .


http://dev.mysql.com/doc/refman/5.0/...databases.html

custangro 12-27-2013 01:54 PM

I've always done this...

Code:

mysqldump --user=root --password=password -A > mysql_bkup.sql
Then on the other database server...

Code:

mysql --user=root --password=password < mysql_bkup.sql
YMMV, so I'd test this on a test VM machine first.

Another thing you can do is use rsync to sync the directories over to another machine...but I don't recommend this.

Since you have Red Hat, you can ask support for assistance with this

Habitual 12-27-2013 03:03 PM

Can you clarify "copy" and "migrate".

Are you moving the db to a new host or merely just copying the data (say, as an experience building exercise)?

jefro 12-28-2013 11:57 AM

Read some of these for more info.

http://dba.stackexchange.com/questio...ver-to-another


All times are GMT -5. The time now is 07:28 PM.