ERROR 1030 (HY000): Got error 28 from storage engine

本文讲述了在Linux环境中,遇到'ERROR 1030 (HY000): Got error 28 from storage engine'错误,经检查发现是由于MySQL临时空间不足。通过查看变量和磁盘使用情况,解决办法是释放根目录空间,确保datadir目录有足够的临时存储。
摘要由CSDN通过智能技术生成

问题背景

Linux 环境登录数据库查看表结构时,报错:

desc base_mirror;
ERROR 1030 (HY000): Got error 28 from storage engine

百度搜索大部分结论都是机器磁盘空间不足的问题

查看mysql的临时空间目录

mysql> show variables like '%dir%';
+-----------------------------------------+----------------------------+
| Variable_name                           | Value                      |
+-----------------------------------------+----------------------------+
| basedir                                 | /usr/                      |
| binlog_direct_non_transactional_updates | OFF                        |
| character_sets_dir                      | /usr/share/mysql/charsets/ |
| datadir                                 | /var/lib/mysql/            |
| ignore_db_dirs                          |                            |
| innodb_data_home_dir                    |                            |
| innodb_log_group_home_dir               | ./                         |
| innodb_max_dirty_pages_pct              | 75                         |
| innodb_max_dirty_pages_pct_lwm          | 0                          |
| innodb_tmpdir                           |                            |
| innodb_undo_directory                   | .                          |
| lc_messages_dir                         | /usr/share/mysql/          |
| plugin_dir                              | /usr/lib64/mysql/plugin/   |
| slave_load_tmpdir                       | /tmp                       |
| tmpdir                                  | /tmp                       |
+-----------------------------------------+----------------------------+
15 rows in set (0.00 sec)

查看本机如下:

df -TH
Filesystem     Type      Size  Used Avail Use% Mounted on
devtmpfs       devtmpfs   17G  9.6G  7.2G  58% /dev
tmpfs          tmpfs      17G  4.1k   17G   1% /dev/shm
tmpfs          tmpfs      17G  1.5M   17G   1% /run
tmpfs          tmpfs      17G     0   17G   0% /sys/fs/cgroup
/dev/vda2      ext4       63G   63G   0G  100% /
/dev/vda1      ext4      1.1G  145M  809M  16% /boot
tmpfs          tmpfs     3.4G     0  3.4G   0% /run/user/0
overlay        overlay    63G   45G   15G  75% /home/docker/overlay/5a22b3cdbe381649e30044980fd09341ceb4460c98fd36055c4727c3c31f9f9b/merged
shm            tmpfs      68M     0   68M   0% /home/docker/containers/f61e00164f9f7d2077952af0a025670d7b88a7fb42c37c4e73d7e4c68ef3115e/shm

机器总体空间还有,但是根目录空间不足,而mysql临时空间目录就在根目录下,需要删除留出空间,操作后:

mysql> desc base_mirror;
+--------------------+--------------+------+-----+---------+----------------+
| Field              | Type         | Null | Key | Default | Extra          |
+--------------------+--------------+------+-----+---------+----------------+
| id                 | int(11)      | NO   | PRI | NULL    | auto_increment |
| mirror_name        | varchar(100) | NO   |     | NULL    |                |
| origin_mirror_name | varchar(100) | NO   |     | NULL    |                |
| mirror_tag         | varchar(100) | NO   |     | NULL    |                |
| cloud_version      | varchar(100) | NO   |     | NULL    |                |
| archi              | varchar(100) | NO   |     | NULL    |                |
| mirror_path        | varchar(200) | NO   |     | NULL    |                |
| os_version         | varchar(100) | NO   |     | NULL    |                |
| namespace          | varchar(100) | NO   |     | NULL    |                |
| description        | longtext     | NO   |     | NULL    |                |
| upgrade_log        | longtext     | YES  |     | NULL    |                |
| create_time        | datetime(6)  | NO   |     | NULL    |                |
| gitlab_path        | varchar(200) | NO   |     | NULL    |                |
| branch_name        | varchar(200) | NO   |     | NULL    |                |
| docker_file_path   | varchar(200) | NO   |     | NULL    |                |
| Dockerfile_info    | longtext     | YES  |     | NULL    |                |
| build_log          | longtext     | YES  |     | NULL    |                |
| commit_id          | varchar(100) | NO   |     | NULL    |                |
| user               | varchar(100) | YES  |     | NULL    |                |
| is_newest          | varchar(100) | NO   |     | NULL    |                |
| is_delete          | varchar(20)  | NO   |     | NULL    |                |
| is_free            | varchar(20)  | NO   |     | NULL    |                |
| can_upgrade        | int(11)      | NO   |     | NULL    |                |
| owner              | varchar(100) | NO   |     | NULL    |                |
| imageid            | varchar(64)  | NO   |     | NULL    |                |
| mirror_sha         | varchar(255) | NO   |     | NULL    |                |
| mirror_label       | varchar(25)  | NO   |     | NULL    |                |
| is_escrow          | int(11)      | NO   |     | NULL    |                |
| openapi_taskid     | int(11)      | YES  |     | NULL    |                |
| is_recommend       | int(11)      | NO   |     | NULL    |                |
+--------------------+--------------+------+-----+---------+----------------+
30 rows in set (0.00 sec)

问题解决。

参考文档:

https://blog.csdn.net/libaominshouzhang/article/details/117413197

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值