---恢复内容开始---

在cmd中备份:数据表结构+数据

        mysqldump -u root db1 > d:\test\test.sql -p

       数据表结构

        mysqldump -u root -d db1 > d:\test\test.sql -p

再cmd中将备份的执行文件写入数据库

      创建表:  create database test default charset utf8 collate utf8_general_ci

      写入:mysql -u root test < d:\teat\test.sql -p  同样,加-d也知识写入结构

 

navicat 的而error 1055问题:

 

在MySQL数据库下,执行sql语句,报错(虽然sql也执行成功了,但是看着可不爽)。错误信息如下:

[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

解决方案:

  一、去MySQL的根目录下找my-default.ini配置文件,打开后将sql_mode中的ONLY_FULL_GROUP_BY删掉



  二、执行SELECT @@sql_mode语句



  三、若存在ONLY_FULL_GROUP_BY,将其删除后更新记录,如下



  四、问题解决,但是上述方法只是当前会话的,重新进入MySQL后问题依然存在,彻底解决如下

set sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
View Code

相关文章:

  • 2022-12-23
  • 2022-01-07
  • 2022-01-07
  • 2021-09-11
  • 2021-05-16
  • 2022-02-07
  • 2022-02-19
猜你喜欢
  • 2021-07-27
  • 2021-04-25
  • 2021-07-22
  • 2021-11-21
  • 2022-01-07
  • 2022-01-07
  • 2021-09-13
相关资源
相似解决方案