MySQL Server 8.0无法在Ubuntu 23上启动

ryoqjall  于 2023-08-03  发布在  Mysql
关注(0)|答案(1)|浏览(133)

我安装MySQL使用

sudo apt install MySQL-Server

字符串
但发动不了。只是说明它正在激活,仅此而已。
这就是我逃跑后得到的

systemctl status mysql.service
journalctl -xeu mysql.service
mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; preset: enabled)
     Active: activating (auto-restart) (Result: oom-kill) since Sat 2023-07-29 08:01:47 PDT; 227ms ago
    Process: 2378 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
    Process: 2386 ExecStart=/usr/sbin/mysqld (code=killed, signal=KILL)
   Main PID: 2386 (code=killed, signal=KILL)
     Status: "Server startup in progress"
        CPU: 2.649s

Jul 29 08:01:47 ubuntu systemd[1]: mysql.service: A process of this unit has been killed by the OOM killer.
Jul 29 08:01:47 ubuntu systemd[1]: mysql.service: Main process exited, code=killed, status=9/KILL
Jul 29 08:01:47 ubuntu systemd[1]: mysql.service: Failed with result 'oom-kill'.
Jul 29 08:01:47 ubuntu systemd[1]: Failed to start mysql.service - MySQL Community Server.
Jul 29 08:01:47 ubuntu systemd[1]: mysql.service: Consumed 2.649s CPU time.
Jul 29 08:01:47 ubuntu systemd[1]: mysql.service: Scheduled restart job, restart counter is at 71.
Jul 29 08:01:47 ubuntu systemd[1]: Stopped mysql.service - MySQL Community Server.
Jul 29 08:01:47 ubuntu systemd[1]: mysql.service: Consumed 2.649s CPU time.
Jul 29 08:01:47 ubuntu systemd[1]: Starting mysql.service - MySQL Community Server...
:~$ journalctl -xeu mysql.service
Jul 29 08:02:43 ubuntu systemd[1]: mysql.service: Scheduled restart job, restart counter is at 76.
░░ 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.
Jul 29 08:02:43 ubuntu systemd[1]: Stopped mysql.service - 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 8529 and the job result is done.
Jul 29 08:02:43 ubuntu systemd[1]: mysql.service: Consumed 2.685s CPU time.
░░ Subject: Resources consumed by unit runtime
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit mysql.service completed and consumed the indicated resources.
Jul 29 08:02:43 ubuntu systemd[1]: Starting mysql.service - 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 8529.

的数据
不管我清除、清理、自动删除和更新多少次。我仍然得到同样的东西。

ycl3bljg

ycl3bljg1#

这个问题是由于使用raspberry pi ubuntu iso而不是干净的ubuntu iso。我使用MariaDB作为这方面的工作。MySQL的设置相对相似,如果不是相同的话。我将它与JDBC一起使用,所以它在连接器方面工作得很好。

sudo apt update
sudo apt install mariadb-server
sudo apt install libmariadb-java

字符串

相关问题