0

Okay, I've hit a brick wall and have run out of ideas.

Master: 8.0.25-0ubuntu0.20.04.1 Slave: 5.7.33-0ubuntu0.16.04.1-log 

Getting error with show slave status\G:

Last_SQL_Errno: 22 Last_SQL_Error: Error 'Character set '#255' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file' on query. Default database: 'db'. Query: 'BEGIN' 

I'm migrating my master server to a new host, which means that it's had lots of updates. The slave is the same previously used server and hasn't changed.

I've tried

  • reset slave all & readding change master to

  • updating both master and slave my.cnf files to include:

    [client] default-character-set=utf8

    [mysqld] character-set-server=utf8 collation-server=utf8_unicode_c

  • manually updating the db collation on both to utf8

I'm out of ideas.

1
  • The docs say that the slave needs to be upgraded BEFORE the master. Go back to your previous working setup and try again. Commented May 31, 2021 at 19:55

2 Answers 2

0

There are gobs of new collations on 8.0. You must use the subset that is available on 5.7 when replicating (either direction).

Please provide SHOW CREATE TABLE on the table in question.

But, I see that it may be SHOW SLAVE STATUS? In that case, file a bug report: bugs.mysql.com and hope that they don't tell you to get lost because of mixing 8.0 and pre-8.0 across replication.

1
  • 2
    And they most likely will say to get lost because the docs say now (and have said basically forever) that you have to upgrade the replication slaves first. Commented Jun 2, 2021 at 19:56
0

Your slave should never be on a minor version compared to the master. Newer mysql versions have features which don't work on older versions. Replication works only upwards (from 5.7 to 8.0) and not downwards (from 8.0 to 5.7).

For the same reason if you upgrading your Percona Mysql cluster from 5.7 to 8.0, you should not apply writes to the nodes which are already on 8.0, as they will try to replicate the writes to the 5.7 nodes and crash the whole cluster.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.