Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Mysql Replication

Posted on 2011-10-04
3
Medium Priority
?
371 Views
Last Modified: 2012-05-12
Hello,

So I got my two mysql servers to replicate, well not really.. but I set them up and no errors are showing HOWEVER the replication isn't actually happening.. I noticed Slave_IO_State: Waiting for master to send event .. I tried to stop and restart is there anything else I can check to see why its not replicating.. neither log file shows anything obvious..

I also wanted to mention that these are both CPanel servers.


*************************** 1. row ***************************
               Slave_IO_State: Waiting for master to send event
                  Master_Host: HOSTONE
                  Master_User: THEUSERNAME
                  Master_Port: 3306
                Connect_Retry: 60
              Master_Log_File: mysql-bin.000004
          Read_Master_Log_Pos: 23584
               Relay_Log_File: cloud1-relay-bin.000003
                Relay_Log_Pos: 251
        Relay_Master_Log_File: mysql-bin.000004
             Slave_IO_Running: Yes
            Slave_SQL_Running: Yes
              Replicate_Do_DB:
          Replicate_Ignore_DB:
           Replicate_Do_Table:
       Replicate_Ignore_Table:
      Replicate_Wild_Do_Table:
  Replicate_Wild_Ignore_Table:
                   Last_Errno: 0
                   Last_Error:
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 23584
              Relay_Log_Space: 22808
              Until_Condition: None
               Until_Log_File:
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File:
           Master_SSL_CA_Path:
              Master_SSL_Cert:
            Master_SSL_Cipher:
               Master_SSL_Key:
        Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error:
               Last_SQL_Errno: 0
               Last_SQL_Error:
1 row in set (0.00 sec)

Open in new window


 SHOW MASTER STATUS;
+------------------+----------+--------------+------------------+
| File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000004 |    23584 |              |                  |
+------------------+----------+--------------+------------------+
1 row in set (0.00 sec)

Open in new window

0
Comment
Question by:Phelms215
3 Comments
 
LVL 24

Accepted Solution

by:
johanntagle earned 2000 total points
ID: 36913917
Based on those two outputs it looks like replication is running okay.  "waiting for master..." means just that - it is waiting for an update to happen on the master.  Can you try to insert/update on the master and see if it gets replicated on the slave?
0
 
LVL 1

Author Closing Comment

by:Phelms215
ID: 36913933
I found out why it wasn't working.. I was expecting it to replicate the changes made before the START SLAVE; was done but obviously that didnt work after further testing everything is working
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 36913934
check this thread:
http://forums.mysql.com/read.php?26,89564,90021#msg-90021

Check the replication account (defined in /etc/my.cnf, "master-user = XXX"),
Make sure that user have permission from remote access.
(select * from mysql.user\G
....
Host: %    <=== allow from any remote host
User: XXX
...
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
Recursive SQL is one of the most fascinating and powerful and yet dangerous feature offered in many modern databases today using a Common Table Expression (CTE) first introduced in the ANSI SQL 99 standard. The first implementations of CTE began ap…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question