geerlingguy / ansible-role-mysql

Ansible Role - MySQL
https://galaxy.ansible.com/geerlingguy/mysql/
MIT License
1.05k stars 861 forks source link

Check master replication fails when running the cluster the first time #542

Open XaratosS opened 3 months ago

XaratosS commented 3 months ago

Hello,

we ran into the following issue: When we ran your mysql role, the replication didnt work on the slave on the first run. We had to do a second run and then the replication started without any issues.

Following happend: The Check master replication status is being checked before the replication on the slave is being configured. I think, that you the Slave replication status should be checked a second time before you start the replication.

Is it possible to fix it myself and get a merge into this role?

with kind regards.

XaratosS commented 2 months ago

Also I do have another question. Is there a reason, why you create the databases empy on both servers? The replication dosnt work with newly created databases on the master. The databases will not be created on the slave.

lipanpan-hub commented 2 months ago

Hello,

we ran into the following issue: When we ran your mysql role, the replication didnt work on the slave on the first run. We had to do a second run and then the replication started without any issues.

Following happend: The Check master replication status is being checked before the replication on the slave is being configured. I think, that you the Slave replication status should be checked a second time before you start the replication.

Is it possible to fix it myself and get a merge into this role?

with kind regards.

I have exactly the same question

XaratosS commented 1 month ago

Also I do have another question. Is there a reason, why you create the databases empy on both servers? The replication dosnt work with newly created databases on the master. The databases will not be created on the slave.

You can ignore this one. This was a fail on my side. I forgot to set up the replication variable.