Use Xtrabackup to create master-slave replication, as well as replication slave and replication client permissions

Source: Internet
Author: User



The previous blog said how to use Xtrabackup to back up and restore databases.


After the database has been restored, the two machine databases are the same, including Binlog file and Pos.
At the same time, after the Xtrabackup backup is completed, the relevant Binlog file and POS information has been written to the backup information file, and the cat can view it under Linux.

Then execute the Change Master command on the standby to successfully build the master-slave replication environment.



In the process of building the replication environment, the copy account needs to have replication slave permissions.

Because the permissions granted to the backup user in the previous blog are replication client permissions, the SQL thread is normal after the change master and start slave command is executed, and the thread from the library IO is not executed. The primary library also does not see the replication process connection.


Workaround: Give Backup users permissions replication slave in the main library. The SQL thread works correctly from the library IO thread. The main library has replication connection information.


Read the official documentation on the interpretation of replication client and replication slave permissions


The REPLICATION CLIENT privilege enables the use of show MASTER status, show SLAVE status, and show BINARY LOGS.

Replication client permissions are used to perform commands such as show Master status. These commands are used to view the replication status.

The REPLICATION SLAVE privilege should is granted to accounts this are used by SLAVE servers to connect to the current Ser Ver as their master. Without this privilege, the slave cannot request updates which have been to made on the master server.

Replication slave is used to connect to the master library for replication.

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.