markdown 将mysql升级到5.7后出错

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown 将mysql升级到5.7后出错相关的知识,希望对你有一定的参考价值。

### error-related-to-only-full-group-by-when-executing-a-query-in-mysq

As of MySQL 5.7.5, the default SQL mode includes ONLY_FULL_GROUP_BY which means when you are grouping rows and then selecting something out of that groups, you need to explicitly say which row should that selection be made from.

Fixing:
```js
$ sudo vim /etc/mysql/my.cnf
```
Add them to bottom of file
```js
[mysqld]
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
```

### field-id-doesnt-have-a-default-value

Remove modes: 
```js
STRICT_TRANS_TABLES, STRICT_ALL_TABLES
``` 

以上是关于markdown 将mysql升级到5.7后出错的主要内容,如果未能解决你的问题,请参考以下文章

将 mysql 从 5.6 升级到 5.7 后“在用户表中找不到任何匹配的行”

mysql从5.6升级到5.7后出现 Expression #1 of ORDER BY clause is not in SELECT list,this is incompatible with

将 MySQL 5.6 升级到 5.7

如何将 MySQL 5.5.40 升级到 MySQL 5.7

将MySQL版本从5.7升级到8.0的操作过程和注意事项

sh 将MAMP升级到Mysql 5.7