I have two servers that I am trying to get replication of one database between. I found a setup guide on sourceforge that I followed and I have tried various other settings since then, but no matter what I do, when I start the slave, the 'Slave_IO_Running' setting is always No....

I have no idea why or what to look at, any suggestions are appreciated.

The slave setup was:

CHANGE MASTER TO MASTER_HOST='myserver.mydomain.net', MASTER_USER='slave_user', 'MASTER_PASSWORD='mypassword', 'MASTER_LOG_FILE='mysql-bin.000011', MASTER_LOG_POS=1368363

(last data from today, trying to do setup again. I deleted and recreated the database on the slave from a new dump and tried to redo the setup.)

I have slave_user setup for %, localhost, and the specific IP of the slave computer but nothing seems to be working...

Thanks in advance for any advice or suggestions


As previously suggested, look in the var directory for the .err file. If it shows nothing, what if you issue: show slave status\G, it should print a line with the error.

Further to this, if you have the SQL thread running but the IO thread stopped, this suggests there's a problem in the communication between your slave and your master. From you "CHANGE MASTER" line, you are not specifying the port number. MySQL defaults to 3306, but are you running the server on that port? Also, is that file you are specifying, mysql-bin.000011 available in the master? And the master can read it, right?

Last, did you grant permissions for the replication user? (as in, have you done it properly, as MySQL manual specifies).

And, apart from this, don't know what else to check, maybe would sniff the network to see if there's any traffic, or just execute mysqlbinlog mysql-bin.000011 to see everything is fine there at that position.

  • Thanks for the suggestions golan, I think the issue is port - My master returns: LISTENING 35336070 CONNECTED 35336074 and the slave returns: LISTENING 437746 I am assuming I should be referencing the listening port on the master? Do I just add that with a colon to the master host? 'myserver.mydomain.com:port'? Thank you! – Christy Mar 11 '10 at 22:08
  • One more thing I noticed - the my.cnf says it should be 3306? The other numbers were from netstat? Sorry for all the questions - I am new at this - I am a software developer but the role is starting to expand.... – Christy Mar 11 '10 at 22:35
  • I believe it's master_port=3307 on the line with the CHANGE MASTER TO. Also, make sure the my.cnf file is actually read by your MySQL (is it placed in the right place?). Check with netstat or lsof and see where it's running. – golan Mar 12 '10 at 9:52
  • Thank you - I finally got it working - it was a port blocked issue. It was using the correct port, but the firewall was blocking it. Got it working and happy now - thanks for the push in the right direction – Christy Mar 12 '10 at 18:43

There can be a variety of reasons for this. One reason may be that you didn't start the slave. Have you run start slave;?

The reason why replication won't start will be logged in the error log, which we would need to provide recommendations in greater detail.

I'd also recommend reading through MySQL's official manual on replication.

MySQL Documentation

  • I did run start slave and the slave_sql_running is set to yes. What log files should I be looking for? I looked in var/log and found mysql.err and mysql.log but they are both empty files. There is also a mysql directory, but it is empty. This is true on both the master and the slave systems – Christy Mar 11 '10 at 19:16
  • -- correction - on the master, the mysql directory is not empty - it has the mysql-bin files – Christy Mar 11 '10 at 19:17
  • The log file defaults to the data directory unless specified otherwise in the .cnf. – Warner Mar 11 '10 at 19:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy