0

I've setup a mysql replica slave a couple months ago. After a couple hickups lately, I've decide to restore it from a clean master export.

I'm trying to start my mysql instance with this command :

mysqld_safe --defaults-file=/etc/mysql/my_secondary.cnf --server-id=2 --log-bin --skip-slave-start --skip-name-resolve&

I've declared the server-id in my cnf file as the following :

server-id = 2

But when I connect with the command line client, and I check the variable, I get :

mysql> show variables like "version";
+---------------+-------------------------+
| Variable_name | Value                   |
+---------------+-------------------------+
| server-id     | 0                       |
+---------------+-------------------------+
1 row in set (0.00 sec)

I'm also getting the feeling that my instance is ignoring my "CHANGE MASTER" commands since it's complaining each time i run "start slave", but I would like to settle this server-id issue first.

I'm running two instance of Mysql 5.1.61-0ubuntu0.10.04.1 (one on port 3306, and this one on 4306)

2
  • 1
    Can you paste the output to \s I suspect that you are changing this variable on server on 4306 and connection to server running on 3306 Apr 26, 2013 at 11:17
  • you were right, I checked the port variable and I was indeed sending my commands to the wrong instance. Can you post an answer so I can mark it as correct?
    – Raphaël
    Apr 26, 2013 at 12:47

1 Answer 1

0

As we suspected, you are making the changes on 4306 and connecting on default port which is the server running on 3306. use these :

mysql -u user -p --port 4306

Not the answer you're looking for? Browse other questions tagged or ask your own question.