我使用带有 LAMP、Python、Dockers 等的 Ubuntu 18.04。有一次,我收到一条消息,表明我的笔记本电脑已准备好升级,我接受并开始更新过程。在 50% 的过程中,我收到一条消息,指出出现问题并且 Ubuntu 停止升级。在重新启动期间,我看到了以下消息:
[FAILED] Failed to start MySQL Community Server.
所以我试图知道我的 MySQL 的状态:systemctl status mysql.service
并得到了结果:
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-11-29 10:46:34 EET; 6h ago
лис 29 10:46:34 it-HP-250-G7-Notebook-PC mysql-systemd-start[1635]: Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips o>
лис 29 10:46:34 it-HP-250-G7-Notebook-PC mysql-systemd-start[1635]: Once the problem is resolved, restart the service.
лис 29 10:46:34 it-HP-250-G7-Notebook-PC systemd[1]: mysql.service: Control process exited, code=exited, status=1/FAILURE
лис 29 10:46:34 it-HP-250-G7-Notebook-PC systemd[1]: mysql.service: Failed with result 'exit-code'.
лис 29 10:46:34 it-HP-250-G7-Notebook-PC systemd[1]: Failed to start MySQL Community Server.
лис 29 10:46:34 it-HP-250-G7-Notebook-PC systemd[1]: mysql.service: Scheduled restart job, restart counter is at 6.
лис 29 10:46:34 it-HP-250-G7-Notebook-PC systemd[1]: Stopped MySQL Community Server.
лис 29 10:46:34 it-HP-250-G7-Notebook-PC systemd[1]: mysql.service: Start request repeated too quickly.
лис 29 10:46:34 it-HP-250-G7-Notebook-PC systemd[1]: mysql.service: Failed with result 'exit-code'.
лис 29 10:46:34 it-HP-250-G7-Notebook-PC systemd[1]: Failed to start MySQL Community Server.
接下来我尝试修复所有包:sudo apt-get update
,sudo apt-get upgrade
但在最后的命令行中看到下一个警告:
2020-11-29T15:12:34.680279Z 0 [ERROR] [MY-000077] [Server] /usr/sbin/mysqld: Error while setting value 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,N
O_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' to 'sql_mode'.
2020-11-29T15:12:34.696826Z 0 [ERROR] [MY-010119] [Server] Aborting
Please take a look at https://wiki.debian.org/Teams/MySQL/FAQ for tips on fixing common upgrade issues.
Once the problem is resolved, run apt-get --fix-broken install to retry.
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script subprocess returned error exit status 1
接下来我尝试修复所有安装:sudo apt-get --fix-broken install
,没有任何帮助。我不想删除 MySQL,因为我有实际的 DataBaces,这对我很重要。
有什么建议么?
请在此处查看答案:https ://stackoverflow.com/a/67747756/6652972
原因是它
NO_AUTO_CREATE_USER
不再是 mysql8 的一部分。