2

The following master-master configuration worked on MySQL Server 5.1.x(Ubuntu 10.04).

Master1(192.168.2.80)

##################################
#MySQL Replication
##################################
skip-host-cache
skip-name-resolve
event_scheduler = ON
max_connections = 500
max_connect_errors = 1000

server-id = 10
replicate-same-server-id = 0
auto-increment-increment = 10
auto-increment-offset = 1

master-host = 192.168.2.81
master-user = repli
master-password = secret
master-connect-retry = 60

binlog-format = MIXED
#binlog-ignore-db = information_schema
#binlog-ignore-db = lb1

#max_binlog_size = 500M
log-bin = /var/log/mysql/mysql-bin
log-bin-index = /var/log/mysql/bin-log.index

log-slave-updates
report-host = 192.168.2.80
replicate-ignore-db = information_schema
replicate-ignore-db = lb2
replicate-ignore-db = performance_schema

relay_log_space_limit = 3G
relay-log = /var/log/mysql/relay.log
relay-log-index = /var/log/mysql/relay-log.index
##################################

Master2(192.168.2.81)

##################################
#MySQL Replication
##################################
skip-host-cache
skip-name-resolve
event_scheduler = ON
max_connections = 500
max_connect_errors = 1000

server-id = 20
replicate-same-server-id = 0
auto-increment-increment = 10
auto-increment-offset = 2

master-host = 192.168.2.80
master-user = repli
master-password = secret
master-connect-retry = 60

binlog-format = MIXED
#binlog-ignore-db = information_schema
#binlog-ignore-db = lb2

#max_binlog_size = 500M
log-bin = /var/log/mysql/mysql-bin
log-bin-index = /var/log/mysql/bin-log.index

log-slave-updates
report-host = 192.168.2.81
replicate-ignore-db = information_schema
replicate-ignore-db = lb1
replicate-ignore-db = performance_schema

relay_log_space_limit = 3G
relay-log = /var/log/mysql/relay.log
relay-log-index = /var/log/mysql/relay-log.index
##################################

Now it's NOT working with MySQL Server 5.5(ubuntu 12.04). I mean to say when I restart the mysql service with the above configuration, mysql service takes long time to start and dont' start at all. Nothing in mysql logs and are empty. I tried killing mysql and starting it again but still it's not starting and if I remove the above replication configuration, then it starts usually.

What's wrong I am doing with mysql 5.5?. I am planning to setup a four node cluster with mysql replication on Ubuntu servers for HA and failover. Is Ubuntu 12.04 and MySQL 5.5 recommended for production use?

Need your inputs. Thank you!

Update 1

After commenting the following master-* lines on both the master, MySQL starts normally and replication works.

#master-host = 192.168.2.xx
#master-user = repli
#master-password = secret
#master-connect-retry = 60

Then how to specify the master server on slaves?. Is CHANGE MASTER TO MASTER_HOST='192.168.2.xx', MASTER_USER='repli', MASTER_PASSWORD='secret',... enough?. Are MySQL 5.5.24 & ubuntu 12.04 production ready?

1
  • Try to start it not in daemon mode, then you might see what error it is showing. Aug 27, 2012 at 18:30

1 Answer 1

1

I mean to say when I restart the mysql service with the above configuration, mysql service takes long time to start and dont' start at all. Nothing in mysql logs and are empty.

Did you specify log-error option in /etc/my.cnf?

After commenting the following master-* lines on both the master, MySQL starts normally and replication works.

#master-host = 192.168.2.xx
#master-user = repli
#master-password = secret
#master-connect-retry = 60

Then how to specify the master server on slaves?. Is CHANGE MASTER TO MASTER_HOST='192.168.2.xx', MASTER_USER='repli', MASTER_PASSWORD='secret',... enough?.

The master-* options are remove in MySQL 5.5. Sure, CHANGE MASTER TO is enough because the value are saved to the master.info file.

Are MySQL 5.5.24 & ubuntu 12.04 production ready?

Yes. But take a look at this for more information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .