Since a couple of days I'm trying (unsuccessfully) to start a replication between two MySQL 8.0.31 running each in a docker on a custom port. This always fails with (Original Post):

Last_IO_Errno: 2003
Last_IO_Error: error connecting to master '[email protected]:33060' - retry-time: 60 retries: 1 message: Can't connect to MySQL server on 'xx.xx.xx.xx:33060' (110)

On my host is also an unused MariaDB running. So I made the same replication setup as used for the MySQL and this runs like a charm.

Now I'm wondering if MySQL has an issue when it runs in a docker? Is somebody here who is running the official MySQL docker image in a replication environment?

I urgently need to get this thing up and running and would be grateful for any help!

  • As far as I know this error occurs for the following scenarios. 1. firewall (servers doesn't communicate with each other). 2. bind-address on MySQL configuration. 3. The mysql user (in your case replicator). 4. Sometimes some systems like SELinux doesn't allow MySQL running on a non standard port . Nov 30, 2022 at 20:26
  • @ErgestBasha (1) is working correctly (I also tried to switch it off) (2) no bind address defined (3) I made a copy & paste and tested the user with mysql -u and checked the GRANTS several times (4) it's running on Ubuntu 20 - meanwhile I could find out that it works from Server2 -> Server1 but not from Server1 -> Server2. The strange thing is that both servers are identical (of course different IP) but they have an identical setup.
    – Lars
    Nov 30, 2022 at 20:55
  • Does the MySQL error log shows anything related to the issue? Nov 30, 2022 at 21:01
  • unfortunately not. The log gives no helpful infos :-( I really have no idea. I did everything as written in the Original post (see link above) and I'm totally confused now that it works in one direction but not in the other one.
    – Lars
    Nov 30, 2022 at 21:09
  • Maybe it is connected on the wrong database in which the user replicator isnt created? Nov 30, 2022 at 21:13


Your Answer

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

Browse other questions tagged or ask your own question.