1

I am getting error for connect to master (mysql 5.1) from slave (mysql5.7)

Slave I/O for channel '': error connecting to master 'replica@hostname' - retry-time: 60 retries: 6, Error_code: 2027

Please help to solve this errror

1
  • SHOW VARIABLES LIKE 'char%'; on both servers.
    – Rick James
    Commented Mar 3, 2016 at 23:15

2 Answers 2

0

Explain the code (sort of)

From the B.4 Client Error Codes and Messages page of the "MySQL 5.7 manual", the error code 2027 means:

Error: 2027 (CR_MALFORMED_PACKET)

Message: Malformed packet

That's not very informative. Looking for this error code, I've found this bug, fixed on MySQL 5.7.8:

For small values of the read_rnd_buffer_size system variable, internal caching of temporary results could fail and cause query execution failure.

You may check the value that you have for read_rnd_buffer_size variable if you have mysql 5.7.7 or lower in a hope to fix your issue, but it might not work.

The replication incompatibility

So, what is your problem. The problem is that you can't have a replication between versions 5.1 and 5.7. From the manual page Replication Compatibility Between MySQL Versions:

MySQL supports replication from one release series to the next higher release series. For example, you can replicate from a master running MySQL 5.5 to a slave running MySQL 5.6, from a master running MySQL 5.6 to a slave running MySQL 5.7, and so on.

Check that page for more information (there are incompatibilities on having many different minor versions, for setups with 3 or more servers).

I haven't really confirmed this by configuring a similar setup, but it seems that you need to upgrade your Mysql 5.1 to at least 5.6 (but preferably to 5.7). If your new 5.7 slave is fresh, you might try to downgrade it from mysql 5.7 to 5.5 (reinstalling and importing fresh data).

But the upgrade from 5.1 to 5.7 option is preferable, as you will have better and improved mysql installations.

-1

Please try to connect from the slave machine to master machine using the same user 'replica'. Once it is through then it is not a permission error.

1
  • I tried to connect mysql from slave machine to master but same error 2027
    – Prashant
    Commented Mar 1, 2016 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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