MySQL报错合集解决办法: server has gone away, @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON

server has gone away: 如下图

MySQL报错合集解决办法: server has gone away, @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON_第1张图片

执行以下命令

    show global variables like '%timeout%';
    set global interactive_timeout=1296000;
    show global variables like 'max_allowed_packet';
    set global max_allowed_packet=268435456;

@@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON: 如下图

MySQL报错合集解决办法: server has gone away, @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON_第2张图片

修改要导入的sql数据文件(data.sql),注释或者去掉类似以下内容的代码:

SET @@GLOBAL.GTID_PURGED='0c655e1c-8360-11e8-b632-883fd358a41a:1-46763628';

SET GLOBAL innodb_file_format = barracuda; 如下图

MySQL报错合集解决办法: server has gone away, @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON_第3张图片

执行以下命令

    set global innodb_file_per_table =ON;
    SET GLOBAL innodb_file_format = barracuda;

你可能感兴趣的:(MySQL报错合集解决办法: server has gone away, @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_MODE = ON)