Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/55.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从Ubuntu 18.04升级到20.04后启动MySQL服务器出现问题_Mysql - Fatal编程技术网

从Ubuntu 18.04升级到20.04后启动MySQL服务器出现问题

从Ubuntu 18.04升级到20.04后启动MySQL服务器出现问题,mysql,Mysql,在从Ubuntu 18.04升级到20.04(MySQL 5.7到8)之后,我在启动MySQL时遇到了一个问题。当我试图启动mysql服务包时,它会在“启动mysql社区服务器…”处停止 《华尔街日报》还给了我以下信息 USER@SERVER:~$ journalctl -xe -- -- The job identifier is 24060. Aug 19 11:38:17 boris-dev systemd[1]: mysql.service: Main process exited,

在从Ubuntu 18.04升级到20.04(MySQL 5.7到8)之后,我在启动MySQL时遇到了一个问题。当我试图启动mysql服务包时,它会在“启动mysql社区服务器…”处停止

《华尔街日报》还给了我以下信息

USER@SERVER:~$ journalctl -xe


--
-- The job identifier is 24060.
Aug 19 11:38:17 boris-dev systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit mysql.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Aug 19 11:38:17 boris-dev systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
Aug 19 11:38:17 boris-dev systemd[1]: Failed to start MySQL Community Server.
-- Subject: A start job for unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has finished with a failure.
--
-- The job identifier is 24060 and the job result is failed.
Aug 19 11:38:17 boris-dev systemd[1]: mysql.service: Scheduled restart job, restart counter is at 139.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Aug 19 11:38:17 boris-dev systemd[1]: Stopped MySQL Community Server.
-- Subject: A stop job for unit mysql.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit mysql.service has finished.
--
-- The job identifier is 24126 and the job result is done.
Aug 19 11:38:17 boris-dev systemd[1]: Starting MySQL Community Server...
-- Subject: A start job for unit mysql.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has begun execution.
--
-- The job identifier is 24126.
有一些数据库,保留它们会很好,但不是必需的

你知道最好做什么吗

提前谢谢


Bo

您还可以检查
/var/log/mysql/error.log
。要备份mysql数据库,您可以执行
rsync-av/var/lib/mysql//var/lib/mysql-bak/
。然后可以
apt清除mysql服务器
apt安装mysql服务器
重新安装。根据我的经验,purge没有删除
/var/lib/mysql/*
,因此我不需要恢复备份。您也可以检查
/var/log/mysql/error.log
。要备份mysql数据库,您可以执行
rsync-av/var/lib/mysql//var/lib/mysql-bak/
。然后可以
apt清除mysql服务器
apt安装mysql服务器
重新安装。根据我的经验,purge没有删除
/var/lib/mysql/*
,所以我不需要恢复备份。
USER@SERVER:~$ journalctl -xe


--
-- The job identifier is 24060.
Aug 19 11:38:17 boris-dev systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit mysql.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Aug 19 11:38:17 boris-dev systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
Aug 19 11:38:17 boris-dev systemd[1]: Failed to start MySQL Community Server.
-- Subject: A start job for unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has finished with a failure.
--
-- The job identifier is 24060 and the job result is failed.
Aug 19 11:38:17 boris-dev systemd[1]: mysql.service: Scheduled restart job, restart counter is at 139.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Aug 19 11:38:17 boris-dev systemd[1]: Stopped MySQL Community Server.
-- Subject: A stop job for unit mysql.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit mysql.service has finished.
--
-- The job identifier is 24126 and the job result is done.
Aug 19 11:38:17 boris-dev systemd[1]: Starting MySQL Community Server...
-- Subject: A start job for unit mysql.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has begun execution.
--
-- The job identifier is 24126.