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.