My Oracle Support Banner

Replication Fails in MySQL 5.6 or Earlier: "[ERROR] Error reading packet from server: Misconfigured master - server_id was not set ( server_errno=1236)" (Doc ID 2164812.1)

Last updated on AUGUST 08, 2016

Applies to:

MySQL Server - Version 5.1 to 5.6 [Release 5.1 to 5.6]
Information in this document applies to any platform.

Symptoms

Replication stops with the following error message on the replication slave:

[ERROR] Error reading packet from server: Misconfigured master - server_id was not set ( server_errno=1236).

 

When checking server_id in on the replication master, the server id is correct.

mysql> SHOW VARIABLES LIKE 'server\_id';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| server_id     |     1 |
+---------------+-------+

 

Checking the MySQL configuration file (my.cnf or my.ini), no server_id is being used in the option file.

 

The following steps reproduces the issue:

  1. No server_id in the MySQL configuration file:
    log-bin
    #server-id=1
     
  2. Restart the master, error messages show in slave:
    [ERROR] Error reading packet from server: Misconfigured master - server_id was not set ( server_errno=1236)
     
  3. On the replication master:
    mysql> SHOW VARIABLES LIKE 'server\_id';
    +---------------+-------+
    | Variable_name | Value |
    +---------------+-------+
    | server_id     |     1 |  <--------still can see the server id on the master, but replication will fail.
    +---------------+-------+
    2 rows in set (0.00 sec)
     

 

Changes

The master database restarted.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.