Log a MySQL master never sync Problem Action (hashlinux)

Source: Internet
Author: User

1 ,

Use MySQL;

Select Host,user from User where user= ' root ';

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/84/01/wKioL1eDQeDSJL8_AAAl7-tggw8614.png "title=" Picture 1.png "alt=" Wkiol1edqedsjl8_aaal7-tggw8614.png "/>

Update user set host= '% ' where user= ' root ';

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/84/02/wKiom1eDQfDR8XQlAAAQH49TsKE833.png "title=" Picture 2.png "alt=" Wkiom1edqfdr8xqlaaaqh49tske833.png "/>

Flush privileges;

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/84/01/wKioL1eDQgGxMwKWAAAKbq9b1bA227.png "title=" Picture 3.png "alt=" Wkiol1edqggxmwkwaaakbq9b1ba227.png "/>

Add a Service-id from the server

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/84/01/wKioL1eDQhCA0F3iAAAPMjI0Un4339.png "title=" Picture 4.png "alt=" Wkiol1edqhca0f3iaaapmji0un4339.png "/>

Increase the number of users who synchronize data

Grant Replication Slave on * * to ' ssss ' @ '% ' identified by ' ssss ';

Stop slave failed

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/84/02/wKiom1eDQinDytVlAAA5HlR9y-Q294.png "title=" Picture 5.png "alt=" Wkiom1edqindytvlaaa5hlr9y-q294.png "/>

Workaround:

Set Password = password ( ' New Password ' );

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/84/01/wKioL1eDQtqB-iF5AAA5HlR9y-Q953.png "title=" Picture 5.png "alt=" Wkiol1edqtqb-if5aaa5hlr9y-q953.png "/> succeeded!

Continue to master from the connection

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/84/01/wKioL1eDQwOhcoEfAAALPIXI3Ws139.png "title=" Picture 6.png "alt=" Wkiol1edqwohcoefaaalpixi3ws139.png "/>


Open slave

Start slave;

View Status:

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/84/01/wKioL1eDQyKi3v44AADaEsQR8BM466.png "title=" Picture 7.png "alt=" Wkiol1edqyki3v44aadaesqr8bm466.png "/>

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/84/02/wKiom1eDQzfSppkuAADCGrl9q1E136.png "title=" Picture 8.png "alt=" Wkiom1edqzfsppkuaadcgrl9q1e136.png "/>

Error again!

Workaround:

To view the library creation information on the Master DB:

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/84/01/wKioL1eDQ0yC3vYQAABadcg5Uv8520.png "title=" Picture 9.png "alt=" Wkiol1edq0yc3vyqaabadcg5uv8520.png "/>

View information from:

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/84/01/wKioL1eDQ1ihGhp5AABkJLkb1x8389.png "title=" Picture 10.png "alt=" Wkiol1edq1ihghp5aabkjlkb1x8389.png "/>

Two table character sets are different, delete the Sbilling library from DB, copy the creation information of the Master db.

Restart the database, stop slave, connect the master and slave, open the slave;

Check the connection status again;

Show table again does not exist!

To query the creation information on the main library:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/84/01/wKioL1eDQ8qTyknjAAD9FSO2nf0948.png "title=" Picture 11.png "alt=" Wkiol1edq8qtyknjaad9fso2nf0948.png "/>


Glue information to the library, create a table below the library

Execute again: Restart the database, stop slave, connect the master and slave, turn on the slave;

Check status at this time:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/84/02/wKiom1eDQ9qjFdQpAABPKL-AAzA622.png "title=" Picture 12.png "alt=" Wkiom1edq9qjfdqpaabpkl-aaza622.png "/>

Master-Slave Synchronization success!


This article is from the "lake and Laughter" blog, please make sure to keep this source http://hashlinux.blog.51cto.com/9647696/1825355

Log a MySQL master never sync Problem Action (hashlinux)

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.