错误提示:
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
执行sudo journalctl -xe查看错误原因
ubuntu audit[16391]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/mysqld" pid=16391 comm="apparmor_parser"
ubuntu kernel: audit: type=1400 audit(1561103596.290:4348): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/sbin/mysqld" pid=16391 comm="apparmor_parser"
ubuntu mysqld[16393]: 2019-06-21T07:53:16.515489Z 0 [ERROR] /usr/sbin/mysqld: Error while setting value ''ONLY_FULL_GROUP_BY,NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,' to 'sql_mode'
错误缘由,mysqld.cnf
[mysqld]
sql_mode='ONLY_FULL_GROUP_BY,NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,
ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,PIPES_AS_CONCAT,ANSI_QUOTES'
网友评论