$ /home/shahriyar.rzaev/XB_TEST/server_dir/PS231017-percona-server-5.6.37-82.2-linux-x86_64-debug/bin/mysql -urepl --password='Baku12345' --port=10023 --socket=/home/shahriyar.rzaev/XB_TEST/server_dir/PS231017-percona-server-5.6.37-82.2-linux-x86_64-debug/socket.sock
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 623
Server version: 5.6.37-82.2-debug-log MySQL Community Server (GPL)

So it turned out, the blank users were preventing slave connection to master server 🙂

8 thoughts on “MySQL blank users preventing slave I/O connection?”

Empty users are a security liability and usability burden, because they hijack the connection from intended users. They are removed by default in 5.7.
In previous versions, you should run mysql_secure_installation, or just remove the blank users manually as in your example.

I was trying to automate the process of starting slave from physical backup for my tests.
Created a replication user, grabbed gtid position etc.
Then I took a backup, prepare, copied-back and started new server.
Run the change master and start slave. Whoops. It could not connect to master server, then tried to figure out what was the reason, at first I thought something was wrong with my script but then suddenly it turned out to be the blank user issue. That was quite funny 🙂