Quantcast
Channel: MySQL Forums - Replication
Viewing all articles
Browse latest Browse all 1561

Mater variables problem with MySQL on Amazon Linux (1 reply)

$
0
0
Scenario: I am setting up a MySQL Database replication on a pair of servers. The Master Server is xx.xx.xx.xx while the Slave Server is on an AWS EC2 Amazon Linux Server. On the Amazon Linux slave /etc/my.cnf file I configured the Server ID and the Master Server variables. I should be able to configure the following variables.

server-id=2
master-host=xx.xx.xx.xx
master-user=replication_user
master-password=xxxxx
master-connect-retry=60
replicate-do-db=MyDatabase
relay-log=/var/lib/mysql/slave-relay.log
relay-log-index=/var/lib/mysql/slave-relay-log.index

[ec2-user@ip-172-31-20-161 etc]$ sudo service mysqld start
MySQL Daemon failed to start.
Starting mysqld: [FAILED]

However the database daemon fails to start. By trial and error (hashing them out one by one to find the culprit(s) I found that by hashing out all the master* variables the server does start.

server-id=2
#master-host=xx.xx.xx.xx
#master-user=replication_user
#master-password=xxxxx
#master-connect-retry=60
replicate-do-db=MyDatabase
relay-log=/var/lib/mysql/slave-relay.log
relay-log-index=/var/lib/mysql/slave-relay-log.index

[ec2-user@ip-172-31-20-161 etc]$ sudo service mysqld start
Starting mysqld: [ OK ]

Why ? and how do I define the master variables in the slave server ?

Viewing all articles
Browse latest Browse all 1561

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>