MySQL Backup and Migration data synchronization method _mysql
Source: Internet
Author: User
However, recently found that the visualization of a little bit of a problem, that is, when the number of data bar exceeds a certain number of EMS SQL Manager hung up, do not know whether it is a software problem ... Of course it's time for me to start by splitting large database files into small pieces and importing them multiple times.
Just found that colleagues use the MySQL mysqldump tool does not exist this problem. (Shame, but I usually rarely contact the database)
Here is how to record the operation:
1. Enter the bin directory and execute the command:
Mysqldump-hlocalhost-uroot-padmin local_db > A.sql
2. It was found that the A.sql file was generated in the bin directory and continued to command:
MySQL remote_db< a.sql 110.110.110.110-uroot-padmin
The following is the principle of synchronization, the need for friends can refer to the next. 1. backup/dump ur local database at 1:00 am and
2. FTP The SQL script to the server side with a bash script at 2:00 am
3. Load the SQL script in the server side at 3:00 am.
Not that it has been made very clear. :)
Your problem is already very loose compared to the one on the top.
1. First back up the local database, Unix/linux under the cronjob,windows with schedule can be timed in
Start a backup bash or bat file at 1 in the morning
2. It takes quite a while to back up the database, so set at 2 in the morning and start another Bash/bat file, which writes
FTP On the east, no more than 5 lines, you can just back up the good files to the server, it also takes some time
3. Start a third Bat/bash file at 3 on the server and load the uploaded files into the database.
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service