zoukankan      html  css  js  c++  java
  • MySQL数据导入sql文件过程中出错

    错误类型:

    ERROR 1231 (42000): Variable 'time_zone' can't be set to the value of 'NULL'

    ERROR 1231 (42000): Variable 'sql_mode' can't be set to the value of 'NULL'

    ERROR 1231 (42000): Variable 'foreign_key_checks' can't be set to the value of 'NULL'

    ERROR 1231 (42000): Variable 'unique_checks' can't be set to the value of 'NULL'

    ERROR 1231 (42000): Variable 'character_set_client' can't be set to the value of 'NULL'

    ERROR 1231 (42000): Variable 'collation_connection' can't be set to the value of 'NULL'

    ERROR 1231 (42000): Variable 'sql_notes' can't be set to the value of 'NULL'

    解决方式:也可能为数据库函数功能未开启

     方式一: 

        mysql> set max_allowed_packet=1024M;  --只对当前会话生效

        mysql> source ./xxxx.sql;

     方式二: 永久生效修改my.cnf

        [root@localhost ~]# vim /etc/my.cnf
        [mysqld]
          max_allowed_packet = 500M
    
        [mysqldump]
          quick
          max_allowed_packet = 500M


    参考文章:http://www.bubuko.com/infodetail-646948.html

        

    我驰骋天下,守你盛世繁华
  • 相关阅读:
    python uuid
    linux 修改时区
    Nginx 缓存命中率
    MongoDB oplog 详解
    MongoDB 复本集搭建
    复制集简介
    解决Python2.7的UnicodeEncodeError: 'ascii' codec can't encode异常错误
    MongoDB 介绍
    python virtualenv
    Docker Compose 模板文件 V2
  • 原文地址:https://www.cnblogs.com/lotuses/p/9890030.html
Copyright © 2011-2022 走看看