【发布时间】:2021-08-17 04:52:09
【问题描述】:
我从 Ubuntu 18 升级到 Ubuntu 20。升级期间 mySQL 升级失败。 升级后,我再次尝试安装mysql-server。我收到以下错误。
ERROR: Unable to start MySQL server:
2021-05-29T02:51:22.812281Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2021-05-29T02:51:22.812291Z 0 [ERROR] [MY-000077] [Server] /usr/sbin/mysqld: Error while setting value 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' to 'sql_mode'.
2021-05-29T02:51:22.813552Z 0 [ERROR] [MY-010119] [Server] Aborting
使用的命令:sudo apt install mysql-server
我在升级到 Ubuntu20 后使用了上面的命令。 我什至尝试编辑配置,但这没有帮助。下面是/etc/mysql/mysql.cnf的内容:
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
[mysqld]
sql_mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
我在这里发现了一个类似的问题:https://askubuntu.com/questions/1296168/mysql-fail-after-ubuntu-20-04-upgrade
【问题讨论】:
-
你能不能试着写成
mysql.cnf,而不是sqlmode=STRICT_TRANS_TABLES, NO_ENGINE_SUBSTITUTION。没有",根据valid values list here? -
也编辑我的问题。我做了,但没有用。以下是内容: !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mysql.conf.d/ [mysqld] sql_mode="STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION"
标签: mysql ubuntu-20.04