I'm having trouble with mysql, I restarted the server, and then it doesn't want to start.
Journalctl give me:
-- 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.
In error log I have few things there...
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
I also have some Table 'name' is marked as crashed and should be repaired in the same log file.
Lastly, maybe not relevant but maybe yes, I have some file '7' write error: No space left on device. Although I deleted thousands of picture which should have create space
df -h is
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 is
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
Your root partition /
is 100% used/full. Which is also reflected (hinted) by the error in mysql.
Try to remove files that will free at least few Gb on / and when df -h
shows that you have some free space, then try starting mysql.
As mysql needs to create INNODB files that might be big in size.
you can either buy more space, depending on your hosting plan, or you can add an additional drive, mount it to /var/lib/mysql
so only mysql can utilize that drive.
breath
and have free space on /
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.