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

server has gone away: 如下图

执行以下命令

    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: 如下图

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

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

SET GLOBAL innodb_file_format = barracuda; 如下图

执行以下命令

    set global innodb_file_per_table =ON;
    SET GLOBAL innodb_file_format = barracuda;
posted @ 2019-10-22 17:04  梦逸灵箭  阅读(511)  评论(0编辑  收藏  举报