Mysql 在 UBUNTU 20.4 中无法启动。我不知道问题出在哪里。我几乎尝试了所有方法。但都不起作用。
sudo journalctl -u mysql.service -n 100
------------------------------------------
Jul 29 09:57:58 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Starting MySQL Community Server...
Jul 29 09:57:58 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Main process exited, code=exited, status=127/n/a
Jul 29 09:57:58 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Failed with result 'exit-code'.
Jul 29 09:57:58 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 mysqld[29622]: /usr/sbin/mysqld: error while loading shared libraries: libprotobuf-lite.so.3.11.4: cannot open shared object file: No such >
Jul 29 09:57:58 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Failed to start MySQL Community Server.
Jul 29 09:57:58 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 3.
Jul 29 09:57:58 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Stopped MySQL Community Server.
Jul 29 09:57:58 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Starting MySQL Community Server...
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 mysqld[29662]: /usr/sbin/mysqld: error while loading shared libraries: libprotobuf-lite.so.3.11.4: cannot open shared object file: No such >
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Main process exited, code=exited, status=127/n/a
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Failed with result 'exit-code'.
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Failed to start MySQL Community Server.
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 4.
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Stopped MySQL Community Server.
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Starting MySQL Community Server...
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 mysqld[29702]: /usr/sbin/mysqld: error while loading shared libraries: libprotobuf-lite.so.3.11.4: cannot open shared object file: No such >
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Main process exited, code=exited, status=127/n/a
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Failed with result 'exit-code'.
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Failed to start MySQL Community Server.
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Stopped MySQL Community Server.
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Start request repeated too quickly.
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Failed with result 'exit-code'.
Jul 29 09:57:59 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Failed to start MySQL Community Server.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Starting MySQL Community Server...
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 mysqld[31890]: /usr/sbin/mysqld: error while loading shared libraries: libprotobuf-lite.so.3.11.4: cannot open shared object file: No such >
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Main process exited, code=exited, status=127/n/a
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Failed with result 'exit-code'.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Failed to start MySQL Community Server.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 1.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Stopped MySQL Community Server.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Starting MySQL Community Server...
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 mysqld[31931]: /usr/sbin/mysqld: error while loading shared libraries: libprotobuf-lite.so.3.11.4: cannot open shared object file: No such >
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Main process exited, code=exited, status=127/n/a
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Failed with result 'exit-code'.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Failed to start MySQL Community Server.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 2.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Stopped MySQL Community Server.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Starting MySQL Community Server...
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 mysqld[31971]: /usr/sbin/mysqld: error while loading shared libraries: libprotobuf-lite.so.3.11.4: cannot open shared object file: No such >
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Main process exited, code=exited, status=127/n/a
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Failed with result 'exit-code'.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Failed to start MySQL Community Server.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 3.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Stopped MySQL Community Server.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Starting MySQL Community Server...
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 mysqld[32011]: /usr/sbin/mysqld: error while loading shared libraries: libprotobuf-lite.so.3.11.4: cannot open shared object file: No such >
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Main process exited, code=exited, status=127/n/a
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Failed with result 'exit-code'.
Jul 29 10:19:24 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Failed to start MySQL Community Server.
Jul 29 10:19:25 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: mysql.service: Scheduled restart job, restart counter is at 4.
Jul 29 10:19:25 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Stopped MySQL Community Server.
Jul 29 10:19:25 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 systemd[1]: Starting MySQL Community Server...
Jul 29 10:19:25 Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01 mysqld[32051]: /usr/sbin/mysqld: error while loading shared libraries: libprotobuf-lite.so.3.11.4: cannot open shared object file: No such >
root@Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01:~# apt-cache search libprotobuf-lite
libprotobuf-lite17 - protocol buffers C++ library (lite version)
root@Sub-Domian-wordpress-ubuntu-s-1vcpu-1gb-blr1-01:~# mysqld
2022-07-29T10:57:46.334262Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.26) starting as process 36952
2022-07-29T10:57:46.344727Z 0 [ERROR] [MY-010123] [Server] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!
2022-07-29T10:57:46.344934Z 0 [ERROR] [MY-010119] [Server] Aborting
2022-07-29T10:57:46.345089Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.26) MySQL Community Server - GPL.
有人能帮助我吗?过去两周我已经陷入这个问题了。
答案1
$ locate libprotobuf-lite.so
/usr/lib/mysql/private/libprotobuf-lite.so.3.19.4
$ dpkg -S /usr/lib/mysql/private/libprotobuf-lite.so.3.19.4
mysql-server-core-8.0: /usr/lib/mysql/private/libprotobuf-lite.so.3.19.4
所以,libprotobuf-lite.so
属于该mysql-server-core-8.0
软件包。重新安装它。
$ sudo apt reinstall mysql-server-core-8.0