繁体   English   中英

无法启动 mysql ubuntu

[英]Can't start mysql ubuntu

我在使用 mysql 时遇到问题,我重新启动了服务器,然后它不想启动。

Journalctl 给我:

-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has failed.
--
-- The result is RESULT.
Jun 02 01:30:53 localhost systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Jun 02 01:30:53 localhost 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.
Jun 02 01:30:53 localhost systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has finished shutting down.
Jun 02 01:30:53 localhost systemd[1]: mysql.service: Start request repeated too quickly.
Jun 02 01:30:53 localhost systemd[1]: mysql.service: Failed with result 'exit-code'.
Jun 02 01:30:53 localhost systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has failed.
--
-- The result is RESULT.

在错误日志中,我有一些东西......

2020-06-01T22:27:41.964914Z 0 [ERROR] InnoDB: Write to file ./ibtmp1failed at offset 10485760, 1048576 bytes should have been written, only 438272 were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
2020-06-01T22:27:41.964922Z 0 [ERROR] InnoDB: Error number 28 means 'No space left on device'
2020-06-01T22:27:41.964927Z 0 [Note] InnoDB: Some operating system error numbers are described at http://dev.mysql.com/doc/refman/5.7/en/operating-system-error-codes.html
2020-06-01T22:27:41.964932Z 0 [ERROR] InnoDB: Could not set the file size of './ibtmp1'. Probably out of disk space
2020-06-01T22:27:41.964937Z 0 [ERROR] InnoDB: Unable to create the shared innodb_temporary
2020-06-01T22:27:41.964942Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2020-06-01T22:27:42.467258Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-06-01T22:27:42.467282Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-06-01T22:27:42.467287Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-06-01T22:27:42.467293Z 0 [ERROR] Failed to initialize builtin plugins.
2020-06-01T22:27:42.467297Z 0 [ERROR] Aborting

我也有一些表“名称”被标记为崩溃,应该在同一个日志文件中修复。

最后,也许不相关但也许是的,我有一些文件“7”写入错误:设备上没有剩余空间。 虽然我删除了数千张应该有创造空间的图片

df -h 是

Filesystem             Size  Used Avail Use% Mounted on
udev                   963M     0  963M   0% /dev
tmpfs                  198M  792K  197M   1% /run
/dev/mapper/vg00-lv01   28G   27G     0 100% /
tmpfs                  986M     0  986M   0% /dev/shm
tmpfs                  5.0M     0  5.0M   0% /run/lock
tmpfs                  986M     0  986M   0% /sys/fs/cgroup
/dev/sda1              464M  113M  323M  26% /boot
tmpfs                  198M     0  198M   0% /run/user/1000

df -hi 是

Filesystem            Inodes IUsed IFree IUse% Mounted on
udev                    241K   422  241K    1% /dev
tmpfs                   247K   652  246K    1% /run
/dev/mapper/vg00-lv01   1.8M  166K  1.6M   10% /
tmpfs                   247K     1  247K    1% /dev/shm
tmpfs                   247K     4  247K    1% /run/lock
tmpfs                   247K    18  247K    1% /sys/fs/cgroup
/dev/sda1               122K   311  122K    1% /boot
tmpfs                   247K    10  247K    1% /run/user/1000

您的根分区/已 100% 使用/已满。 mysql 中的错误也反映(暗示)了这一点。

尝试删除将在 / 上释放至少几个 Gb 的文件,并且当df -h显示您有一些可用空间时,然后尝试启动 mysql。

由于 mysql 需要创建可能很大的 INNODB 文件。

或者:

您可以购买更多空间,具体取决于您的托管计划,或者您可以添加额外的驱动器,将其挂载到/var/lib/mysql以便只有 mysql 可以使用该驱动器。

但是您仍然需要确保您的服务器breath并在/上有可用空间

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM