mysql数据库版本不同所引起的问题

1.sql_mode不同所引起的问题

mysql5.7 ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'lhh.lhh.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

mysql5.8 去掉了NO_AUTO_CREATE_USER

2.表的默认值

int not null

text not null default ''

int类型无默认值 插入时未插入该项 mysql5.6成功 mysql5.7以not null却未有默认值而报错。

text类型不允许有默认值 mysql5.8。亲测5.6允许有默认值。

3.mysql系统库做的改变

mysql5.7存在mysql.event mysql.proc ... 但在mysql8中已经存在上述两张表了。

4.innodb_strict_mode

创建的表字段过多 一行的字节大于65535个字符就会报错 需要设置innodb_strict_mode=0

5.lower_case_table_names

linux与windows操作系统下需要注意

6.default_authentication_plugin=mysql_native_password

这个不设置有可能会引起之前程序连接不上新版数据库的问题

 

任何一个开发好的庞大系统再转换数据库时总是不容易的。

 

posted @ 2019-01-23 16:49  坚持v  阅读(1108)  评论(0编辑  收藏  举报