pt-online-schema-change utf8mb4 错误解决方法

默北 MySQLpt-online-schema-change utf8mb4 错误解决方法已关闭评论12,7513字数 1116阅读3分43秒阅读模式

Character set 'utf8mb4' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
Character set 'utf8mb4' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index.xml' file
Cannot connect to MySQL: DBI connect('med_data;host=127.0.0.1;mysql_read_default_group=client','root',...) failed: Can't initialize character set utf8mb4 (path: /usr/share/mysql/charsets/) at /usr/bin/pt-online-schema-change line 2281

更改/usr/share/mysql/charsets/Index.xml 内容,将文章源自运维生存时间-https://www.ttlsa.com/mysql/pt-online-schema-change-utf8mb4-error-solution/

<charset name="utf8">
  <family>Unicode</family>
  <description>UTF-8 Unicode</description>
  <alias>utf-8</alias>
  <collation name="utf8_general_ci"     id="33">
   <flag>primary</flag>
   <flag>compiled</flag>
  </collation>
  <collation name="utf8_bin"            id="83">
    <flag>binary</flag>
    <flag>compiled</flag>
  </collation>
</charset>

改为文章源自运维生存时间-https://www.ttlsa.com/mysql/pt-online-schema-change-utf8mb4-error-solution/

<charset name="utf8mb4">
  <family>Unicode</family>
  <description>UTF-8 Unicode</description>
  <alias>utf-8</alias>
  <collation name="utf8_general_ci"     id="33">
   <flag>primary</flag>
   <flag>compiled</flag>
  </collation>
  <collation name="utf8_bin"            id="83">
    <flag>binary</flag>
    <flag>compiled</flag>
  </collation>
</charset>

不光光pt-online-schema-change工具会遇到这个问题,其它工具也会,也是这么解决的。文章源自运维生存时间-https://www.ttlsa.com/mysql/pt-online-schema-change-utf8mb4-error-solution/ 文章源自运维生存时间-https://www.ttlsa.com/mysql/pt-online-schema-change-utf8mb4-error-solution/

weinxin
我的微信
微信公众号
扫一扫关注运维生存时间公众号,获取最新技术文章~
默北
  • 本文由 发表于 29/04/2016 01:13:05
  • 转载请务必保留本文链接:https://www.ttlsa.com/mysql/pt-online-schema-change-utf8mb4-error-solution/
  • percona-toolkit
  • pt-online-schema-change
  • utf8mb4