Search code examples
mysqlreplication

MySQL daemon failed to start


MySQL won't restart when I try "service mysqld restart"because I'm using this part in my.cnf

master-host =  [private-IP-of-db01]
master-user = [replication-username]
master-password = [replication-password]
master-connect-retry = 60

when I comment out these parts! MySQL restarts fine. Why is that so? Also I have to include these lines in my.cnf because of master slave replication and I can't omit them out.

enter image description here


Solution

  • Usually master host information on the slave mysql server is stored in "master.info" file and maintained there. You may want to start mysql without adding the configuration to your "my.cnf" file, the only configuration you may want to add is a "server_id" , Once mysql is up and running, you should setup slave with 'change master command....'.