mysql主从同步时报:
Last_IO_Error: error connecting to master 'xx' - retry-time: 60 retries: 18
使用mysql -u user -h xx -p 命令连接主库时,报ERROR 1129 (HY000): Host 'xx' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
提示用mysqladmin命令清理下host
使用whereis mysqladmin命令查找mysqladmin目路径
一般在/usr/bin/mysqladmin目录下
cd /usr/bin/ 然后执行mysqladmin -u root -p flush-hosts
主从库都要执行一遍,然后重新开启同步,就ok了。