Not the answer you need?
Register and ask your own question!

Master-Master Replication issue

FandaRFandaR EntrantInactive User Role Beginner
Hello,
I have an issue to setup master-master replication

The replication seems doesnt work for "CREATE DATABASE" sql command

I have followed this guide
https://www.digitalocean.com/community/articles/how-to-set-up-mysql-master-master-replication

The replication works fine when databases are created on both servers however when I try to create new database its not replicated

So when I do on one server "create database example" and "create table example.dummy (`id` varchar(10));"

I cannot see it on the second one and it just shows this error in slave status

"Last_Error: Error 'Unknown database 'example'' on query. Default database: ''. Query: 'create table example.dummy (`id` varchar(10))'"

my.cnf conf server 1
[mysqld]
skip_name_resolve
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
server-id = 2
log_bin = /var/log/mysql/mysql-bin.log
binlog_do_db = setup
# bind-address = 127.0.0.1

server 2
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
server-id = 1
log_bin = /var/log/mysql/mysql-bin.log
binlog_do_db = setup
skip_name_resolve

any idea?

Thank You in advnace

Comments

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.