First, check the error log file of B and find the following errors:
ERROR: Slave I/O: ERROR connecting to master ‘replication @vms00782 :3306’ – retry-time: 60 retry: 2, Error_code: 1045
Then look at the error code from the previous section with Perror:
perror 1045
MySQL error code 1045 (ER_ACCESS_DENIED_ERROR): Access denied for user ‘%-.48s’@’%-.64s’ (using password: %s)
Is there a problem with the account used for copying?First verify on A that the replication user account exists and that the correct permissions have been granted
Mysql> show grants for ‘usvr_replication’@’%’;
+ — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — +
| Grants for usvr_replication @ %
| + — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — +
| GRANT REPLICATION SLAVE ON *.* TO ‘usvr_replication’@’%’ IDENTIFIED BY PASSWORD ‘*F4039654D0AFD80BB0A7775938EFD47ACB809529’ |
+ — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — — +
1 row in the set (0.00 SEC)
No problem found!
Then, try connecting from B to A using this account:
Mysql-uusvr_replication – H 192.168.83.35-P-p55944
Enter the password you set and press enter, not connected!! Enter again, not connected yet!!
It seems that the problem is here, carefully check, the original password was a mistake!
Try to recreate the replication relationship with the correct password:
Execute on B:
mysql> stop slave;
mysql> researt slave;
mysql> change master to master_host = ‘VMS00782’,
master_user = ‘replication’,
master_password = ‘ReplPass@123456’,
master_port = 3306,
master_log_file = ‘VMS00782-bin.000001’,
master_log_pos = 120;
mysql> start slave;
mysql> show slave status;
Everything is ok!!
A few points to note:
Use the original password instead of the hashed password in the master_password section of the change master to statement.
Be aware of looking at the error log file in the first place, using the Perror tool to see specific errors based on the error code.
Other FREQUENTLY asked questions:
Mysql fails to start: first look at the error prompted in the error log file, and find the cause according to the error; Check whether the data directory and other configurations in the configuration file are correct; Check whether the owner and group of MySQL related directories are correct; Check to see if any mySQld processes are still running that were not shut down properly.
Mysql cannot connect: first check if the mySQld process is started correctly; See if the provided link string is correct.
Read More:
- MySQL master-slave replication. An error is reported when starting slave. Slave failed to initialize relay log info structure from the repository
- The problem of master-slave database synchronization stop caused by MySQL deleting data
- Hadoop hdfs dfs -ls/ error: Call From master/192.168.88.108 to slave1:9820 failed on connection except
- Error connecting to master, – retry time: 60 retries: 86400
- When configuring ROS distributed / Error report solution and command requirements encountered in the process of master-slave computer
- Mysql start slave error 1201 (HY000)
- MySQL operation and maintenance slave_ skip_ errors
- Explain MySQL replication error 1032 & 1205
- The MySQL service suddenly hangs up with the error message can’t connect to MySQL server on ‘localhost’ (10061)
- Error report after solving git push origin master
- Top35: pychar reports an error when connecting to MySQL server returns invalid timezone. Need to set ‘servertimezone’ property
- How to Solve Hbase Error: Master is initializing
- pathspec ‘master’ did not match any files known to git
- Pikachu vulnerability is installed in the shooting range, and an error is reported when connecting to the MySQL database
- error: src refspec master does not match anyerror: failed to push some refs to
- Error: SRC refspec master does not match any. error: failed to push some refs to
- An error occurs when HBase uses the shell command: pleaseholdexception: Master is initializing solution
- error: src refspec master does not match any error:failed to push some refs to ‘[email protected]:xxxx