
Also habe ich es gelöscht und dann versucht, das MySQL-Server-Paket auf Ubuntu 20.04 zu installieren, aber es lässt sich aufgrund eines Konfigurationsproblems nicht installieren. Ich habe festgestellt, dass es nicht einmal anhält und es scheint, als würde es sich automatisch wieder hochfahren. Ich kann es nicht stoppen, egal was ich tue.
gediminas@ubuntu-g:~$ sudo ps aux | grep mysql
systemd+ 9177 5.5 2.2 2123136 364052 ? Ssl 21:21 0:00 mysqld
gedimin+ 9354 0.0 0.0 20200 2548 pts/0 S+ 21:21 0:00 grep --color=auto mysql
gediminas@ubuntu-g:~$ sudo pkill mysql
gediminas@ubuntu-g:~$ sudo ps aux | grep mysql
gedimin+ 9365 0.0 0.0 20200 2652 pts/0 S+ 21:21 0:00 grep --color=auto mysql
gediminas@ubuntu-g:~$ sudo ps aux | grep mysql
systemd+ 9432 26.0 1.9 722716 317524 ? Ssl 21:21 0:00 mysqld
gedimin+ 9553 0.0 0.0 20200 664 pts/0 S+ 21:22 0:00 grep --color=auto mysql
gediminas@ubuntu-g:~$ sudo ps aux | grep mysql
systemd+ 9432 41.0 2.2 1926528 363848 ? Ssl 21:21 0:00 mysqld
gedimin+ 9585 0.0 0.0 20200 664 pts/0 S+ 21:22 0:00 grep --color=auto mysql
gediminas@ubuntu-g:~$ sudo ps aux | grep mysql
systemd+ 9432 41.0 2.2 1926528 363848 ? Ssl 21:21 0:00 mysqld
gedimin+ 9588 0.0 0.0 20200 660 pts/0 S+ 21:22 0:00 grep --color=auto mysql
systemctl status mysql
zeigt an :
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; disabled; vendor preset: enabled)
Active: activating (start) since Sat 2021-07-24 21:43:57 EEST; 1s ago
Process: 21011 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 21019 (mysqld)
Status: "Server startup in progress"
Error: 98 (Address already in use)
Tasks: 17 (limit: 19032)
Memory: 331.6M
CGroup: /system.slice/mysql.service
└─21019 /usr/sbin/mysqld
liep. 24 21:43:57 ubuntu-g systemd[1]: Starting MySQL Community Server...
und nachdem ich es ein bisschen gespammt habe, zeigt es einen Fehler an
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; disabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Sat 2021-07-24 21:44:35 EEST; 270ms ago
Process: 21763 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 21771 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Main PID: 21771 (code=exited, status=1/FAILURE)
Status: "Server startup in progress"
Error: 98 (Address already in use)
liep. 24 21:44:36 ubuntu-g systemd[1]: mysql.service: Scheduled restart job, restart counter is at 139.
liep. 24 21:44:36 ubuntu-g systemd[1]: Stopped MySQL Community Server.
liep. 24 21:44:36 ubuntu-g systemd[1]: Starting MySQL Community Server...
Wenn ich alle MySQL-Pakete lösche und versuche zu installieren, mysql-server
erhalte ich diesen Fehler
update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode
Setting up mysql-server-8.0 (8.0.25-0ubuntu0.20.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
mysqld will log errors to /var/log/mysql/error.log
mysqld is running as pid 29427
dpkg: error processing package mysql-server-8.0 (--configure):
installed mysql-server-8.0 package post-installation script
subprocess returned error exit status 1
No apport report written because the error message indicates its a followup error from a previous failure.
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-8.0; however:
Package mysql-server-8.0 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Processing triggers for systemd (245.4-4ubuntu3.11) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Errors were encountered while processing:
mysql-server-8.0
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
Wenn ich mysql-server
dpkg -l 'mysql*' installiere und ausführe, erhalte ich
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================-=======================-============-=================================================>
un mysql-client-5.7 <none> <none> (no description available)
ii mysql-client-8.0 8.0.25-0ubuntu0.20.04.1 amd64 MySQL database client binaries
un mysql-client-core-5.7 <none> <none> (no description available)
ii mysql-client-core-8.0 8.0.25-0ubuntu0.20.04.1 amd64 MySQL database core client binaries
ii mysql-common 5.8+1.0.5ubuntu2 all MySQL database common files, e.g. /etc/mysql/my.c>
un mysql-common-5.6 <none> <none> (no description available)
iU mysql-server 8.0.25-0ubuntu0.20.04.1 all MySQL database server (metapackage depending on t>
un mysql-server-5.5 <none> <none> (no description available)
un mysql-server-5.7 <none> <none> (no description available)
iF mysql-server-8.0 8.0.25-0ubuntu0.20.04.1 amd64 MySQL database server binaries and system databas>
un mysql-server-core-5.7 <none> <none> (no description available)
ii mysql-server-core-8.0 8.0.25-0ubuntu0.20.04.1 amd64 MySQL database server binaries
mysql-server:
Installed: 8.0.25-0ubuntu0.20.04.1
Candidate: 8.0.25-0ubuntu0.20.04.1
Version table:
*** 8.0.25-0ubuntu0.20.04.1 500
500 http://lt.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://lt.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages
100 /var/lib/dpkg/status
8.0.19-0ubuntu5 500
500 http://lt.archive.ubuntu.com/ubuntu focal/main amd64 Packages
500 http://lt.archive.ubuntu.com/ubuntu focal/main i386 Packages
Lösung
Es kam vor, dass das MySQL-Server-Paket einfach defekt war. So können Sie es reparieren:
- Starten Sie den Computer neu und booten Sie, während Sie die Umschalttaste gedrückt halten.GNU BRUB-Menü
- WählenErweiterte Optionen für Ubuntu
- WählenUbuntu, mit Linux X.XX.X-XX (Wiederherstellungsmodus)
- Und dann inWiederherstellungsmenüeinfach auswählenReparieren defekter Pakete