Hello, I have existing server1 wanted to add new server2 (used The Perfect Server - Debian 8.4 Jessie (Apache2, BIND, Dovecot, ISPConfig 3.1 guide to setup server1 & server2). So I followed HowTo: "Installing a Web, Email & MySQL Database Cluster on Debian 8.4 Jessie with ISPConfig 3.1" exactly per guide (I tried 2-3 times already), every time on the last step in section 5.5 MySQL Master-Master-Replication and check the slave-status with SHOW SLAVE STATUS \G Check, that the slave is running: Slave_IO_Running: Yes Slave_SQL_Running: Yes I get error: Last_IO_Errno: 1593 Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it). Error message is misleading, I double checked, server IDs are 1 and 2. I tried to restart mysql master-master replication (per schaal-24.de guide), both options skip the error and rebuild still did not work I cannot get to the result where original guide shows Slave_IO_Running: Yes Slave_SQL_Running: Yes What am I doing wrong? I would appreciate any assistance. Thanks!
master and slave have equal MySQL server ids; these ids must be different for replication to work = re-check the mysql-configs on both servers. Or grep for server_id in /etc/mysql
Thanks Florian! This is what I'm showing server1 [email protected]:/etc/mysql# grep server-id my.cnf server-id = 1 replicate-same-server-id = 0 #server-id = 1 server2 [email protected]:/etc/mysql# grep server-id my.cnf server-id = 2 replicate-same-server-id = 0 #server-id = 1
I made some progress. I made sure Database client version: libmysql - 5.5.57 is same on server1 & server2. I'm not sure if that got rid of Last_IO_Errno: 1593 I'm still at the last step in section 5.5 MySQL Master-Master-Replication and check the slave-status with SHOW SLAVE STATUS \G Check, that the slave is running: Slave_IO_Running: Yes Slave_SQL_Running: Yes I get new error "Last_IO_Errno: 2003" Last_IO_Errno: 2003 Last_IO_Error: error connecting to master '[email protected]:3306' - retry-time: 60 maximum-retries: 86400 message: Can't connect to MySQL server on '11.22.33.44' (110 "Connection timed out") Port 3306 is open on public IP I'm using. Any suggestion how to fix error 2003?
Are you able to telnet from slave to master node on port 3306. Did you Check if outbound port is open on slave server?
Thanks! I think i can connect from slave to master on 3306 but it is accepting the connection and then immediately closing the connection (see below) [email protected]:~# telnet master-server-ip 3306 Trying master-server-ip... Connected to master-server-ip. Escape character is '^]'. b 5.5.5-10.0.30-MariaDB-0+deb8u2??ASajs&[??sS&a6+puz)VVmysql_native_passwordConnection closed by foreign host.
If you are able to connect from slave to master on telnet then there should not be issue with "timed out" error in replication.