(1)[Err] 1055 - Expression #1 of ORDER BY...

在执行insert语句之后,成功的插入了数据。但是报了一个异常:

[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

解决方法:

在 /etc/my.cnf 文件里加上如下:
sql_mode='NO_ENGINE_SUBSTITUTION'
然后,重启Mysql服务就可以解决了!

通常linux 系统mysql的配置文件的位置在 :  /etc/mysql/my.cnf 

但是在我的腾讯云中的mysql 的配置文件位置在 :/etc/mysql/mysql.conf.d/mysqld.cnf

我在/etc/mysql/my.cnf  这个里面配置之后,mysql 一直启动不起来,并报错:

mysql.service failed because the control process exited with error code

修改到/etc/mysql/mysql.conf.d/mysqld.cnf 就可以了

详情:https://blog.csdn.net/qq_34332010/article/details/74106747

(2)mysql数据库编码问题

在insert中,插入中文出现如下错误:1366-incorrect string value:\xE7\x8E\x8B for column fi

查看数据库表的编码后,发现字段编码并不是utf-8,而是latin1。

使用腾讯云ubuntu 中mysql 出现的问题和解决方法

修改成 utf-8 即可。

(3)mysql的重启方式

/etc/inint.d/mysq start

------------------------------------------------------------------

未完待更2018年4月23日16:41:10

------------------------------------------------------------------

相关文章:

  • 2022-12-23
  • 2021-11-02
  • 2021-06-06
  • 2021-06-22
  • 2021-08-18
  • 2021-08-15
  • 2021-06-05
猜你喜欢
  • 2021-09-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-30
  • 2022-12-23
  • 2022-01-14
相关资源
相似解决方案