Enterprise Scenario One master many from downtime to solve from the library

Source: Internet
Author: User

Solution Ideas:

1. Log in from the library

Mysql-uroot-p123456-s/application/mysql-5.6.20/mysql.sock

2. Stop slave Service

Mysql>stop slave;

3. Fully backup the synchronized data from the library or the main library, and determine the synchronization file and synchronization location

Mysqldump-uroot-p123456-s/application/mysql-5.6.20/mysql.sock-a-B--events|gzip >/opt/rep.sql.gz

4. Pour the data into the library

#gunzip Rep.sql.gz>rep.sql

#mysql-uroot-p ' pwd123 '-s/application/mysql-5.6.20//mysql.sock < Rep.sql

5. Perform synchronous commands

Mysql>change Master to master_host= ' 10.0.0.7 ', master_user= ' repl ',

Master_password= ' Slavepass ', master_log_file= ' mysql-bin.001440 ',

master_log_pos=68824;

6. Turn on the sync service Services

Mysql>start slave

This article from "Flat Light is true" blog, please be sure to keep this source http://ucode.blog.51cto.com/10837891/1747084

Enterprise Scenario One master many from downtime to solve from the library

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.