Mysql backup and migration data synchronization method bitsCN.com recently found that this visualization operation has some problems, that is, when the number of data entries exceeds a certain number of EMS SQL Manager, it will be suspended, and it does not know whether it is a software problem ...... Of course, at the beginning, I split large database files into small copies and imported them multiple times.
I just found that my colleague used the mysqldump tool provided by mysql. (Shame, but I usually seldom access databases)
The operation method is recorded here:
1. enter the bin directory and run the following command:
Mysqldump-hlocalhost-uroot-padmin local_db> a. SQL
2. the. SQL file is generated in the bin directory. continue with the command:
Mysql remote_db <a. SQL 110.110.110.110-uroot-padmin
The following figure shows the synchronization principle. For more information, see. 1. backup/dump ur local database at am and
2. ftp the SQL script to the server side with a bash script at am
3. load the SQL script in the server side at am.
It's not clear .. :)
Your problem is loose.
1. Back up the local database first, use cronjob in unix/linux, and use schedule in windows at regular intervals
Start the bash or bat file of the backup at AM.
2. It takes a considerable amount of time to back up the database, so it is set to start another bash/bat file at, which is written in
If there are no more than five lines of data on the ftp, you can upload the backed up file to the server. This also takes some time.
3. Start the third bat/bash file at on the server and load the uploaded file to the database. BitsCN.com
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.