1. Error reporting
I/O thread error
Check the /var/log/mysqld.d log to check the error report;
On the slave machine, port 3306 of the telnet host shows that the connection is refused;
And the slave mysql login user password problem, the password input is correct but an error is reported [ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)];
mine
2. Troubleshooting ideas
- Is the ip configuration correct?
- Whether the configuration master and slave files are correct
- Whether the firewall is closed;
- Is the iptables rule cleared?
- Is selinux forbidden
- Whether the slave can ping the master
- Whether port 3306 of the telnet host can be connected
- If mysql is password-free authentication, there is no port 3306 on the slave telnet host, and the password-free authentication must be turned off
- Whether the slave is started
The solution steps are as follows:
1. Edit the /etc/my.cnt file, add a piece of code under [mysqld]; save and exit
skip-grant-tables
2. Restart mysql
systemctl restart mysqld
3. Enter mysql; (no password is required at this time)
mysql -uroot
4. View root user password:
select user,host,plugin,authentication_string from mysql.user;
You can view the user password is very messy, it is wrong
5. Modify root user password;
update mysql.user set authentication_string='*16F51094B9A153AECE86BCA3F7A237CB6FE5C183' where user='root';
Because my copy user has the same password as the root user, I changed it to the copy user's password
6. After the modification is completed, exit mysql, edit /etc/my.cnf, and comment the code added in the first step;
7. Log in to mysql again and enter the password to log in normally;
8. In show slave status\G; just fine