I'm having quite a fuss with my two MySQL DB servers lately. I'm trying
to establish replication between a MySQL 4.0.20 server (master) and a
MySQL 4.1.11 server (slave).
From what I read, replication from a 4.0.x server -> 4.1.x server will
work, just not the other way around.
However, that's not really my problem. After unsuccessfully completing
the configuration myself, I used
http://forums.gentoo.org/viewtopic.php?t=241123 as a guide. I followed
the instructions explicitly, but alas it does not work. I've been
through every mailing list, forum post and google query imaginable, but
I haven't found an answer. Now i'm asking any of you all knowing and
powerful mysql guru's to help!
Here's the setup:
MySQL Server 1 (master) my.cnf:
-------------------------------------------------
[mysqld]
datadir=/var/lib/mysql
log-slow-queries=/var/log/mysql/slow_queries.log
tmpdir=/var/tmp/mysql
set-variable = key_buffer_size=128M
set-variable = max_allowed_packet=1M
set-variable = max_connections=500
### irb set-variable = long_query_time = 3
set-variable = thread_cache_size=70
set-variable = sort_buffer=12M
log-bin=/var/log/mysql/binary/mysql_binary_log
binlog-do-db=articles
server-id=1
[safe_mysqld]
err-log=/var/log/mysql/mysqld.log
-------------------------------------------------
MySQL Server 2 (db1): MySQL 4.1.11
-------------------------------------------------
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
old_passwords=1
server-id=2
master-host=<IP Address>
master-user=replication
master-password=<super secret password>
replicate-do-db=articles
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
-------------------------------------------------
I've checked skip-networking, its set to false on both servers. Both
servers are not behind a firewall either.
Here's the error I get on the slave when I restart the mysqld service:
-------------------------------------------------
050923 09:07:31 mysqld started
050923 09:07:31 InnoDB: Started; log sequence number 0 43634
/usr/libexec/mysqld: ready for connections. Version: '4.1.11' socket:
'/var/lib/mysql/mysql.sock' port: 3306 Source distribution
050923 09:07:31 [Note] Slave SQL thread initialized, starting
replication in log 'mysql_binary_log.001' at position 79080, relay log
'./db1-relay-bin.000001' position: 4
050923 09:07:31 [ERROR] Slave I/O thread: error connecting to master
'replication@<IP Address>:3306': Error: 'Can't connect to MySQL server
on '<IP Address>' (13)' errno: 2003 retry-time: 60 retries: 86400
-------------------------------------------------
Here's what SHOW SLAVE STATUS\G; shows me:
-------------------------------------------------
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Connecting to master
Master_Host: <IP Address>
Master_User: replication
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql_binary_log.001
Read_Master_Log_Pos: 79080
Relay_Log_File: db1-relay-bin.000001
Relay_Log_Pos: 4
Relay_Master_Log_File: mysql_binary_log.001
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: 79080
Relay_Log_Space: 4
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)
ERROR:
No query specified
-------------------------------------------------
I'm stumped. Any help would be greatly appreciated and you'll be
instantly added to my christmas card list if you provide me with a
solution! mmmm, honey baked ham!
Thank you in advance for any help and i apologize for this insanely long
newsgroup post.