簡體   English   中英

systemd[1]:安裝 mysql-server 時無法啟動 MySQL Community Server

[英]systemd[1]: Failed to start MySQL Community Server while installing mysql-server

當我嘗試重新安裝 mysql 時,它給了我以下錯誤:

sudo apt-get install mysql-server
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias       
Leyendo la información de estado... Hecho
mysql-server ya está en su versión más reciente (8.0.19-1debian10).
Los paquetes indicados a continuación se instalaron de forma automática y ya no son necesarios.
  galera-3 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl
  libdbd-mysql-perl libdbi-perl libfcgi-perl libhtml-template-perl
  libreadline5 libterm-readkey-perl rsync socat
Utilice «sudo apt autoremove» para eliminarlos.
0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 179 no actualizados.
2 no instalados del todo o eliminados.
Se utilizarán 0 B de espacio de disco adicional después de esta operación.
¿Desea continuar? [S/n] s
Configurando mysql-community-server (8.0.19-1debian10) ...
Failed to preset unit: File mysql.service: Link has been severed
/usr/bin/deb-systemd-helper: error: systemctl preset failed on mysql.service: No such file or directory
[mysql.conf:23] Line references path below legacy directory /var/run/, updating /var/run/mysqld → /run/mysqld; please update the tmpfiles.d/ drop-in file accordingly.
[mysql.conf:23] Line references path below legacy directory /var/run/, updating /var/run/mysqld → /run/mysqld; please update the tmpfiles.d/ drop-in file accordingly.
[mysql.conf:23] Line references path below legacy directory /var/run/, updating /var/run/mysqld → /run/mysqld; please update the tmpfiles.d/ drop-in file accordingly.
Failed to get unit file state for mysql.service: Link has been severed
mysql.service is a disabled or a static unit, not starting it.
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2020-03-10 12:00:58 -03; 15ms ago
     Docs: man:mysqld(8)
           http://dev.mysql.com/doc/refman/en/using-systemd.html
  Process: 7906 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
  Process: 7941 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
 Main PID: 7941 (code=exited, status=1/FAILURE)
   Status: "Data Dictionary upgrade from MySQL 5.7 in progress"

mar 10 12:00:56 azeroth systemd[1]: Starting MySQL Community Server...
mar 10 12:00:58 azeroth systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
mar 10 12:00:58 azeroth systemd[1]: mysql.service: Failed with result 'exit-code'.
mar 10 12:00:58 azeroth systemd[1]: Failed to start MySQL Community Server.
dpkg: error al procesar el paquete mysql-community-server (--configure):
 el subproceso instalado paquete mysql-community-server script post-installation devolvió el código de salida de error 1
dpkg: problemas de dependencias impiden la configuración de mysql-server:
 mysql-server depende de mysql-community-server (= 8.0.19-1debian10); sin embargo:
 El paquete `mysql-community-server' no está configurado todavía.

dpkg: error al procesar el paquete mysql-server (--configure):
 problemas de dependencias - se deja sin configurar
Se encontraron errores al procesar:
 mysql-community-server
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

我只知道它與 smysql 社區有關,但沒有別的。 我已經嘗試過這里列出的所有內容: https : //askubuntu.com/questions/1008298/cant-start-mysql-server-database-corruption但沒有任何效果。

另外: journalctl -xe 給出:

-- Support: https://www.debian.org/support
-- 
-- A start job for unit mysql.service has begun execution.
-- 
-- The job identifier is 2279.
mar 10 17:39:49 azeroth systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- An ExecStart= process belonging to unit mysql.service has exited.
-- 
-- The process' exit code is 'exited' and its exit status is 1.
mar 10 17:39:49 azeroth systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
mar 10 17:39:49 azeroth systemd[1]: Failed to start MySQL Community Server.
-- Subject: A start job for unit mysql.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- A start job for unit mysql.service has finished with a failure.
-- 
-- The job identifier is 2279 and the job result is failed.
mar 10 17:39:49 azeroth sudo[2743]: pam_unix(sudo:session): session closed for user root
mar 10 17:41:51 azeroth sudo[2805]:  jenifer : TTY=pts/0 ; PWD=/home/jenifer ; USER=root ; COMMAND=/usr/bin/journalctl -xe
mar 10 17:41:51 azeroth sudo[2805]: pam_unix(sudo:session): session opened for user root by (uid=0)

我已經嘗試刪除 mysql-server 並使用apt-get重新安裝它,但它給出了同樣的錯誤。 如果有人可以幫助我,我將不勝感激。

你可以解決這部分:

[mysql.conf:23] Line references path below legacy directory /var/run/, updating /var/run/mysqld → /run/mysqld; please update the tmpfiles.d/ drop-in file accordingly.
[mysql.conf:23] Line references path below legacy directory /var/run/, updating /var/run/mysqld → /run/mysqld; please update the tmpfiles.d/ drop-in file accordingly.
[mysql.conf:23] Line references path below legacy directory /var/run/, updating /var/run/mysqld → /run/mysqld; please update the tmpfiles.d/ drop-in file accordingly.

通過編輯mysql.conf文件並替換

/var/run/mysqld

/run/mysqld

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM