Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

miss create db in slave #20

Open
linbo opened this issue Sep 18, 2014 · 3 comments
Open

miss create db in slave #20

linbo opened this issue Sep 18, 2014 · 3 comments

Comments

@linbo
Copy link

linbo commented Sep 18, 2014

MySQL Version: 5.5.38

I follow this configuration to create a new Replication environment, then loads data from an existing MySQL Server. Since slave didn't create databases, sync db from master to slave will be failed, told db not exist when create tables;

The solution is set replicate_do_db = dbname in slave

  - hosts: master
    roles:
     - {role: mysql, mysql_db: [{name: benz}, {name: benz2}],
                     mysql_users: [{name: ben3, pass: foobar, priv: "*.*:ALL"},
                                   {name: ben2, pass: foo}],
                     mysql_db_id: 8 

  - hosts: slave
    roles:
     - {role: mysql, mysql_db: none, mysql_users: none,
              mysql_repl_role: slave, mysql_repl_master: vm2,
              mysql_db_id: 9, mysql_repl_user: [{name: repl, pass: foobar}] }
@geogdog
Copy link
Contributor

geogdog commented Nov 17, 2014

I've been working on this tonight. It looks like an ordering problem between the config change in my.cnf, the restart of mysql to introduce the changes and the creation of the databases.

I've got a fix, but I have to test it before sending in a pull request.

@hbokh
Copy link

hbokh commented Jan 20, 2015

Any news on this issue? We're still waiting for a fix in the release...

@geogdog
Copy link
Contributor

geogdog commented Jan 20, 2015

The solution that I used didn't solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants