Last_Error: Column 0 of table ‘mysql.user‘ cannot be converted from type ‘char(180(bytes))‘ to type

Last_Error: Column 0 of table ‘mysql.user‘ cannot be converted from type ‘char(180(bytes))‘ to type

 

比如下面的参数在5.5版本中就不存在,但是在5.6,5.7中存在,就需要根据需求来取舍。

171019 9:47:53 [ERROR] /usr/local/mysql_5.5/bin/mysqld: unknown variable 'master_info_repository=TABLE'

171019 9:47:53 [ERROR] Aborting

171019 9:48:48 [ERROR] /usr/local/mysql_5.5/bin/mysqld: unknown variable 'relay_log_info_repository=TABLE'

171019 9:49:12 [ERROR] /usr/local/mysql_5.5/bin/mysqld: unknown variable 'binlog_checksum=NONE'

关键就在于复制关系的配置了。

我先来验证5.6到5.7的配置关系,没想到启动slave后看到了如下的错误。

Last_SQL_Error: Column 1 of table 'mysql.user' cannot be converted from type 'char(48(bytes))' to type 'char(96(bytes) utf8)'

这类问题可以考虑修改参数来设置无损复制的程度,比如这样设置。

mysql> set global slave_type_conversions='ALL_LOSSY,ALL_NON_LOSSY';

接着就收到了另外一个错误。

Last_SQL_Error: Can't create conversion table for table 'mysql.user'