MySQL slave I/O thread not running

Champ picture Champ · Nov 12, 2009 · Viewed 54.1k times · Source

I have set up replication for MySQL server. I can connect from the slave machine to the master server using the replication user/password. I have got the slave SQL thread running, but the slave I/O thread is not running and the slave I/O status comes as empty when checked using 'show slave status'. What could be the problem?

How do I solve this? Restarting the slave does not help.

This was my bad: Instead of giving a 'replication slave' privilege to *.*, I was only giving it for my_db.*.

Answer

brian-brazil picture brian-brazil · Nov 14, 2009

Instead of giving a 'replication slave' privilege to ., I was only giving it for my_db.*.

Replication slave is only a global privilege (i.e. per-user only), this means that a command such as

GRANT REPLICATION SLAVE on mydb.* TO 'someuser'@'%';

has no effect as you can't grant it per-database/column/table.

The command you need to run is:

GRANT REPLICATION SLAVE on *.* TO 'someuser'@'%';

Then do a START SLAVE. You might also find it useful to look in the mysql error log.

I'd suggest a good read of the replication setup documentation, as it explains all of this in detail.