Mysql 不会在 ubuntu 服务器 16.04 上重新启动

标签 mysql ubuntu-16.04 ubuntu-server

Mysql 不会再次重新启动,我收到此错误:

Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.

这里是尾部错误日志:

sudo tail -30 /var/log/mysql/error.log
2018-07-09T18:22:31.107868Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2018-07-09T18:22:31.204826Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2018-07-09T18:22:31.707270Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2018-07-09T18:22:31.707323Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2018-07-09T18:22:31.709057Z 0 [Warning] InnoDB: 1048576 bytes should have been written. Only 376832 bytes written. Retrying for the remaining bytes.
2018-07-09T18:22:31.709080Z 0 [Warning] InnoDB: Retry attempts for writing partial data failed.
2018-07-09T18:22:31.709092Z 0 [ERROR] InnoDB: Write to file ./ibtmp1failed at offset 2097152, 1048576 bytes should have been written, only 376832 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.
2018-07-09T18:22:31.709103Z 0 [ERROR] InnoDB: Error number 28 means 'No space left on device'
2018-07-09T18:22:31.709110Z 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
2018-07-09T18:22:31.709119Z 0 [ERROR] InnoDB: Could not set the file size of './ibtmp1'. Probably out of disk space
2018-07-09T18:22:31.709126Z 0 [ERROR] InnoDB: Unable to create the shared innodb_temporary
2018-07-09T18:22:31.709133Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2018-07-09T18:22:32.210454Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2018-07-09T18:22:32.210480Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2018-07-09T18:22:32.210490Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2018-07-09T18:22:32.210500Z 0 [ERROR] Failed to initialize builtin plugins.
2018-07-09T18:22:32.210508Z 0 [ERROR] Aborting

2018-07-09T18:22:32.210527Z 0 [Note] Binlog end
2018-07-09T18:22:32.219434Z 0 [Note] Shutting down plugin 'MyISAM'
2018-07-09T18:22:32.219459Z 0 [Note] Shutting down plugin 'CSV'

请问有人遇到过这个错误吗?

最佳答案

我认为在这种情况下,仔细阅读消息会对您有很大帮助。您的消息说...

2018-07-09T18:22:31.709092Z 0 [ERROR] InnoDB: Write to file ./ibtmp1failed at offset 2097152, 1048576 bytes should have been written, only 376832 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.

2018-07-09T18:22:31.709103Z 0 [ERROR] InnoDB: Error number 28 means 'No space left on device'

保存 MySQL 数据的磁盘似乎已满。执行df -h

Filesystem Size Used Avail Use% Mounted on 
/dev/root  20G   19G    0  100%  / 
devtmpfs  7.9G     0 7.9G    0%  /dev 
tmpfs     7.9G     0 7.9G    0%  /dev/shm 
tmpfs     7.9G   14M 7.9G    1%  /run 
tmpfs     5.0M     0 5.0M    0%  /run/lock 
tmpfs     7.9G     0 7.9G    0%  /sys/fs/cgroup 
tmpfs     7.9G     0 7.9G    0%  /run/shm 
/dev/sda2 487M   22M 437M    5%  /boot 
/dev/sda4 1.8T  376M 1.7T    1%  /home

Ubuntu/Debian 将 MySQL 放置在/var/lib/mysql 中。在您的计算机上,/var 位于根文件系统上,首先显示在 df 输出中。 该文件系统已满。

如果不知道系统上还有什么,就很难准确地告诉您要做什么。但是,您的/var 目录树需要位于更大的文件系统上,或者您需要弄清楚如何将 MySQL 数据放在/home 下。

关于Mysql 不会在 ubuntu 服务器 16.04 上重新启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51252263/

相关文章:

mysql - 如何检查数据库中的某一列是否为空值

mysql - 双周团体约会

php - Laravel - 如何从文章标题正确生成独特的 slug?

java - Selenium - 在同一字段中输入的文本,即使打算在不同的字段中输入

Gitlab独立安装失败

mysql - 避免在 SQL 中 INSERT 出现重复值

ubuntu - kate (ubuntu 16.04) 没有标签插件

ssh - 如果其他用户没有 SSH key ,我如何授予他们访问权限?

linux - linux命令中括号有什么用