ERROR 1105 (HY000): Unknown charset id 255

271 views
Skip to first unread message

Chun Chen

unread,
Aug 3, 2018, 5:37:25 AM8/3/18
to TiDB user group


I have deployed TiDB in the production environment. Yesterday I found that some machines failed to connect to the database and it occurred that `ERROR 1105 (HY000): Unknown charset id 255`. There was no problem with the privilege. What caused this problem and how to solve this problem?
Message has been deleted

Nan Xiang

unread,
Aug 3, 2018, 6:10:59 AM8/3/18
to TiDB user group
 This error is because of the charset of the operating system. Use `echo $LANG` to see the charset. If it is UTF-8, you can connect to TiDB using `mysql --default-character-set=utf8`.

在 2018年8月3日星期五 UTC+8下午5:37:25,Chun Chen写道:

Morgan Tocker

unread,
Aug 4, 2018, 12:25:52 AM8/4/18
to chen...@pingcap.com, tidb...@googlegroups.com
On Fri, Aug 3, 2018 at 3:38 AM Chun Chen <chen...@pingcap.com> wrote:
>
> This error is because of the charset of the operating system. Use `echo $LANG` to see the charset. If it is UTF-8, you can connect to TiDB using `mysql --default-character-set=utf8`.

I have another theory, but the fix is the same:

I believe you may be using a MySQL 8.0 client where the default
charset is utf8mb4 (the charset id 255 is utf8mb4). See for example
this bug where the MySQL server changed the default on clients:

https://bugs.mysql.com/bug.php?id=85946

I believe from your description you may have the reverse?

--
Morgan Tocker
http://www.tocker.ca/
Reply all
Reply to author
Forward
0 new messages