0

I am trying to setup master-slave replication on MySQL 5.6.

When I update my database in the master, the change is not reflected on the slave. When I show the process list on the slave it shows this message:

mysql> show processlist;
+----+-------------+-----------+------+---------+------+-----------------------------------------------------------------------------+------------------+
| Id | User        | Host      | db   | Command | Time | State                                                                       | Info             |
+----+-------------+-----------+------+---------+------+-----------------------------------------------------------------------------+------------------+
|  1 | system user |           | NULL | Connect | 6440 | Slave has read all relay log; waiting for the slave I/O thread to update it | NULL             |
|  2 | system user |           | NULL | Connect | 5730 | Waiting for master to send event                                            | NULL             |
| 42 | root        | localhost | NULL | Query   |    0 | NULL                                                                        | show processlist |
+----+-------------+-----------+------+---------+------+-----------------------------------------------------------------------------+-------------

Any suggestions?

1

2 Answers 2

0

See the MySQL documentation or a Step by step replication setup blog if you need to review.

If these doesn't help please share the output of show slave status\G (as such it appears connected) and also output of my.cnf of master/slave. Mainly you need to worry about server-ids, replication filters (replicate-to-db/table etc)

2
  • Thank you for your quick answer. i forget to put the replicate-do-db in the slave's my.cnf file. now its working fine . Commented Aug 29, 2015 at 6:15
  • Glad to hear that...
    – mysql_user
    Commented Sep 1, 2015 at 8:07
0

This command may not have run properly on slave while configuring its master

CHANGE MASTER TO MASTER_HOST='xx.xx.xx.xx', MASTER_USER='replication', MASTER_PASSWORD='xxxxxxxxxxx', MASTER_PORT=3306, MASTER_LOG_FILE='mysql-bin.00xxxx', MASTER_LOG_POS=xxx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.