I'm trying to setup a mysql replication over an SSH tunnel. The odd thing about this setup is that I have one master with mysql 5.0.60sp1-enterprise-gpl-log and one slave with mysql 5.0.67-community-log. Could it be so that it's not possible to replicate between community and
enterprise edition?
As you can see in my log below, it's possible to login on the remote server with the mysql client. But the replication get "Can't connect to MySQL server on '127.0.0.1' (13)"
Is it any log file I have forgotten to look in, to get more info?
[root@mysql1-av ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 73
Server version: 5.0.67-community-log MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
The version of the slave mysql
[root@mysql1-av ~]# autossh -f -M 20001 -L 3307:10.200.200.200:3306
[email protected] -N
[root@mysql1-av ~]# mysql -h127.0.0.1 --port 3307 -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5189
Server version: 5.0.60sp1-enterprise-gpl-log MySQL
Enterprise Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> Aborted
Login to the master mysql with the mysql client over the ssh tunnel.
[root@mysql1-av ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 75
Server version: 5.0.67-community-log MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> change master to master_host='127.0.0.1', MASTER_PORT=3307, master_user='xxxx', master_password='xxxx', master_log_file='bin.000001';
Query OK, 0 rows affected (0.00 sec)
mysql> start slave;
Query OK, 0 rows affected (0.00 sec)
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Connecting to master
Master_Host: 127.0.0.1
Master_User: replNSG
Master_Port: 3307
Connect_Retry: 60
Master_Log_File: bin.000001
Read_Master_Log_Pos: 4
Relay_Log_File: relay.000001
Relay_Log_Pos: 98
Relay_Master_Log_File: bin.000001
Slave_IO_Running: No
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: 4
Relay_Log_Space: 98
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: NULL
1 row in set (0.00 sec)
Start the replication, but it breaks on IO.
[root@mysql1-av ~]# tail /var/log/mysqld.log
120921 22:17:59 [Note] Slave I/O thread killed while connecting to master
120921 22:17:59 [Note] Slave I/O thread exiting, read up to log 'bin.000001', position 4
120921 22:17:59 [Note] Error reading relay log event: slave SQL thread was killed
120921 22:29:36 [Note] Slave SQL thread initialized, starting replication in log 'bin.000001' at position 4, relay log '/var/lib/mysql/relay.000001' position: 4
120921 22:29:36 [ERROR] Slave I/O thread: error connecting to master '
[email protected]:3307': Error: 'Can't connect to MySQL server on '127.0.0.1' (13)' errno: 2003 retry-time: 60 retries: 86400
Because it can't connect to the master server.