• 记录一下MySQL的一些报错解决方式


    1.1055报错信息

    [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ‘information_schema.PROFILING.SEQ’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

    注:根据异常信息分析能发现,这个问题主要是由于sql_mode引起,所以先查看sql_mode后修改即可,主要是去除only_full_group_by

    解决方式:修改当前数据库的SQL_MODE

    SELECT @@sql_mode;
    
    ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
    SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
    
    SELECT @@sql_mode;
    STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

    报错信息:java.sql.SQLException: null, message from server: "Host '192.168.1.32' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"

    解决办法:使用mysqladmin flush-hosts 命令清理一下hosts文件;
       mysqladmin flush-hosts -h iphost -P port -u root -prootpasswd;
      备注:
    也可以mysql -uroot -prootpasswd 在数据库中执行命令:flush hosts;

    切记:修改完成后要重启!!!

    后面遇到新的继续更新

  • 相关阅读:
    结对编程项目作业2-结对编项目设计文档
    20170914-构建之法:现代软件工程-阅读笔记
    课后作业-阅读任务-阅读提问-1
    GIT 的使用方法
    团队-井字棋-需求分析
    结对-贪吃蛇-需求分析
    python_基础_0
    Unix_07_文件系统高级操作_2
    Unix_06_文件系统高级操作_1
    Unix_05_文件系统高级操作_0
  • 原文地址:https://www.cnblogs.com/wdzhz/p/12725694.html
Copyright © 2020-2023  润新知