# Errors are reported when using pt-table-checksum to check MySQL8.0.25 and MySQL5.7.34

**URL:** <https://forums.percona.com/t/errors-are-reported-when-using-pt-table-checksum-to-check-mysql8-0-25-and-mysql5-7-34/11525>\
**Category:** Percona Toolkit\
**Created:** [July 26, 2021, 12:20pm UTC](https://forums.percona.com/t/errors-are-reported-when-using-pt-table-checksum-to-check-mysql8-0-25-and-mysql5-7-34/11525 "2021-07-26T12:20:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ntufangang](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@ntufangang](https://forums.percona.com/u/ntufangang)\
**Post date:** [July 26, 2021, 12:20pm UTC](https://forums.percona.com/t/errors-are-reported-when-using-pt-table-checksum-to-check-mysql8-0-25-and-mysql5-7-34/11525/1 "2021-07-26T12:20:16Z")

</div>

mater:8.0.25 with my.cnf:  
[mysqld]  
character-set-server=utf8mb4  
collation-server=utf8mb4\_general\_ci  
skip-character-set-client-handshake

slave:5.7.34

version:percona-toolkit-3.3.1

command line:  
pt-table-checksum --defaults-file=~/etc/my.cnf --host=‘127.0.0.1’ --user=‘root’ --password=‘root123’ --port=3306 --replicate=test.checksums --no-check-binlog-format --databases=db1

slave reports errors:  
[ERROR] Slave SQL for channel ‘’: Error ‘Character set ‘#255’ is not a compiled character set and is not specified in the ‘/home/mysql/share/charsets/Index.xml’ file’ on query. Default database: ‘test’. Query: ‘CREATE DATABASE IF NOT EXISTS `test` /\* pt-table-checksum \*/’, Error\_code: 22  
2021-07-26T11:44:12.751369Z 72 [Warning] Slave: Character set ‘#255’ is not a compiled character set and is not specified in the ‘/home/mysql/share/charsets/Index.xml’ file Error\_code: 22

I have set skip-character-set-client-handshake ,why dose mysql still report errors？

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [July 26, 2021, 4:16pm UTC](https://forums.percona.com/t/errors-are-reported-when-using-pt-table-checksum-to-check-mysql8-0-25-and-mysql5-7-34/11525/2 "2021-07-26T16:16:12Z")

</div>

Can you manually create a table in 5.7 using the new utf8mb4 / utf8mb4\_general\_ci? If not, this is the reason for the failure; your 5.7 does not have the same character sets that MySQL 8 has. You would need to force pt-table-checksum to create the database/table it needs using latin1 so that it is compatible with your 8.0 and 5.7.

---

<div class="post-metadata">

**Author:** ![ntufangang](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@ntufangang](https://forums.percona.com/u/ntufangang)\
**Post date:** [July 27, 2021, 2:18am UTC](https://forums.percona.com/t/errors-are-reported-when-using-pt-table-checksum-to-check-mysql8-0-25-and-mysql5-7-34/11525/3 "2021-07-27T02:18:22Z")

</div>

thanks.  
‘Create Statement’ can be executed successfully in 5.7.  
CREATE DATABASE `TEST` /\*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4\_general\_ci _/ /_!80016 DEFAULT ENCRYPTION=‘N’ \*/;

‘utf8mb4\_0900\_ai\_ci’ is identified by #255

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [July 27, 2021, 4:08am UTC](https://forums.percona.com/t/errors-are-reported-when-using-pt-table-checksum-to-check-mysql8-0-25-and-mysql5-7-34/11525/4 "2021-07-27T04:08:33Z")

</div>

[https://dev.mysql.com/doc/refman/5.7/en/charset-connection.html](https://dev.mysql.com/doc/refman/5.7/en/charset-connection.html)

utf8mb4\_0900\_ai\_ci does not exist in 5.7. You must have this collation set on some random table/database in your 8.0 setup. You’ll need to convert this to something available in 5.7.

---

<div class="post-metadata">

**Author:** ![ntufangang](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@ntufangang](https://forums.percona.com/u/ntufangang)\
**Post date:** [July 27, 2021, 12:50pm UTC](https://forums.percona.com/t/errors-are-reported-when-using-pt-table-checksum-to-check-mysql8-0-25-and-mysql5-7-34/11525/5 "2021-07-27T12:50:42Z")

</div>

But I have set ‘skip-character-set-client-handshake’ to avoid this compatibility,why it doesn’t work.

[http://www.tocker.ca/2013/09/10/improving-mysqls-default-configuration.html](http://www.tocker.ca/2013/09/10/improving-mysqls-default-configuration.html)  
“I would rather like to see that option go! Or at least it should be exposed as a variable as well (refer: [MySQL Bugs: #69997: Please expose skip-character-set-client-handshake as a variable](http://bugs.mysql.com/bug.php?id=69997)). Besides setting skip-character-set-client-handshake to FALSE will only have effect when a charset is specified in mysql\_options(). Any client can execute SET NAMES after connection (and I believe that is the way most applications do – the only practical difference between the two is support for non-server-default-charset-characters in username and password).”

I have try to modify pt-table-checksum like this,it can work well.  
1648 if ( my ($charset) = $cxn\_string =~ m/charset=([\w]+)/ ) {  
1649 #$sql = qq{/_!40101 SET NAMES “$charset”_/};  
1650 $sql = qq{/_!40101 SET NAMES “utf8”_/};

---

<div class="post-metadata">

**Author:** ![matthewb](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/matthewb/32/34_2.png) [@matthewb](https://forums.percona.com/u/matthewb)\
**Post date:** [July 27, 2021, 4:54pm UTC](https://forums.percona.com/t/errors-are-reported-when-using-pt-table-checksum-to-check-mysql8-0-25-and-mysql5-7-34/11525/6 "2021-07-27T16:54:06Z")

</div>

> [@ntufangang](#):
>
> But I have set ‘skip-character-set-client-handshake’ to avoid this compatibility,why it doesn’t work.

I would not be surprised at all if this parameter did not affect replication. There are a few parameters like that which only affect non-replication clients.

---

<div class="post-metadata">

**Author:** ![ntufangang](https://avatars.discourse-cdn.com/v4/letter/n/8dc957/32.png) [@ntufangang](https://forums.percona.com/u/ntufangang)\
**Post date:** [July 28, 2021, 8:58am UTC](https://forums.percona.com/t/errors-are-reported-when-using-pt-table-checksum-to-check-mysql8-0-25-and-mysql5-7-34/11525/7 "2021-07-28T08:58:31Z")

</div>

OK,thanks，it’s not the best solution.
