当前位置: 首页 > 知识库问答 >
问题:

MySQL 无法在乌班图 22.04 中启动

董花蜂
2023-03-14

几天前,我在新安装的ubuntu 22.04上安装了LAMP,一切都很顺利。但今天当我尝试启动mysql时,它显示了以下错误。

mysql.service - MySQL Community Server
 Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
 Active: failed (Result: exit-code) since Sun 2022-05-01 09:35:16 IST; 19s ago
Process: 6471 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Process: 6479 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)


Main PID: 6479 (code=exited, status=1/FAILURE)
     Status: "Server startup in progress"
      Error: 2 (No such file or directory)
        CPU: 312ms

May 01 09:35:16 g-pc systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
May 01 09:35:16 g-pc systemd[1]: Stopped MySQL Community Server.
May 01 09:35:16 g-pc systemd[1]: mysql.service: Start request repeated too quickly.
May 01 09:35:16 g-pc systemd[1]: mysql.service: Failed with result 'exit-code'.
May 01 09:35:16 g-pc systemd[1]: Failed to start MySQL Community Server.

日记显示以下内容:

May 01 09:35:16 g-pc systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
░░ 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.
May 01 09:35:16 g-pc 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 3436 and the job result is done.
May 01 09:35:16 g-pc systemd[1]: mysql.service: Start request repeated too quickly.
May 01 09:35:16 g-pc 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'.
May 01 09:35:16 g-pc 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 3436 and the job result is failed.


 

共有1个答案

严兴言
2023-03-14

经过几个小时的尝试,终于弄清楚了问题。此线程解决了该问题。我只是运行命令 sudo chown mysql:mysql -R /var/log/mysql .这解决了这个问题。

 类似资料:
  • 我开始使用Docker,并尝试在Ubuntu中运行一个流浪的VirtualBox,它运行在Mac OSX中的另一个VirtualBox内(10.9,一切的最新版本)。 我无法启动内部虚拟框,给我的消息VT-x不可用。VT-x在虚拟盒子中启用,不确定缺少什么!

  • 我正在运行Ubuntu 14,当我尝试运行但我收到此错误: 找不到gem的mysql2( 所以我运行< code>bundle install,然后我得到以下错误。 因此,我运行了,它成功安装了,但是当我再次运行时,它会给我同样的错误:

  • 我想在捕获屏幕时用< code>ffmpeg录制音频。我在使用< code>alsa时遇到的错误是,我的映像没有声卡< code>-f alsa -ac 2 -i hw:0 以下是在新版本的Ubuntu上重现的方法 在新的ubuntu docker映像中启动一个会话。 安装程序 alsa(高级 Linux 声音体系结构) 列出声卡 播放此声音将失败,因为此图像没有任何声卡

  • Xampp、mysql、phpmyadmin几天前运行得很好。现在我正遇到这个问题。 Xampp控制面板还提供了以下错误详细信息: 我也试着这样做,这对一些有同样问题的人是有效的 XAMPP-MySQL意外关闭

  • 相同的配置适用于窗口10。但是当我尝试用ubuntu运行相同的配置时,它显示了一个错误。 使用jenkins运行时的错误消息

  • 这个问题似乎不是关于特定的编程问题,软件算法或主要由程序员使用的软件工具。如果您认为该问题将与其他 Stack Exchange 站点的主题相关,则可以发表评论以解释问题可能在哪里可以得到解答。 我有以下场景。我在Windows 10系统上的Virtualbox中运行Ubuntu 14 LTS。 在这个ubuntu中,我想安装一个Virtualbox,在那里我需要运行一个自定义docker ISO