sql語句報錯:SELECT list is not in GROUP BY clause and contains nonaggregatedmysql
環境是ubuntu,mysql版本5.7.27,在/etc/mysql/mysql.conf.d/mysqld.cnf
找到圖中的代碼sql
並添加 sql_mode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
添加之後:ubuntu
而後重啓mysql sudo systemctl restart mysql.service
spa