首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >数据库目录存储完全需要将其链接到新分区

问数据库目录存储完全需要将其链接到新分区
EN

Unix & Linux用户
提问于 2018-08-22 04:17:18
回答 1查看 35关注 0票数 0

我的mysql数据库目录大小已满。所以我想把它改为另一个有大量空间的分区。使用的数据库版本是MySQL 5.7.23,操作系统是CentOS 7。

在网上搜索后,我得到了两个解决方案。第一个问题如下:

首先,我创建了一个指向新驱动器的Systemlink。然后我试着启动mysql,每次尝试启动它都会失败。在删除系统链接时,它将启动。

所犯的错误

代码语言:javascript
复制
[Note] InnoDB: Highest supported file format is Barracuda.
2018-08-21T10:08:04.839330Z 0 [ERROR] InnoDB: Operating system error number 
13 in a file operation.
2018-08-21T10:08:04.839349Z 0 [ERROR] InnoDB: The error means mysqld does 
not have the access rights to the directory.
2018-08-21T10:08:04.839360Z 0 [ERROR] InnoDB: os_file_readdir_next_file() 
returned -1 in directory ./, crash recovery may have failed for some .ibd 
files!
2018-08-21T10:08:04.839385Z 0 [ERROR] InnoDB: Plugin initialization aborted 
with error Generic error
2018-08-21T10:08:05.440529Z 0 [ERROR] Plugin 'InnoDB' init function returned 
error.
2018-08-21T10:08:05.440597Z 0 [ERROR] Plugin 'InnoDB' registration as a 
STORAGE ENGINE failed.
2018-08-21T10:08:05.440610Z 0 [ERROR] Failed to initialize builtin plugins.
2018-08-21T10:08:05.440617Z 0 [ERROR] Aborting

2018-08-21T10:08:05.440665Z 0 [Note] Binlog end
2018-08-21T10:08:05.440770Z 0 [Note] Shutting down plugin 'CSV'
2018-08-21T10:08:05.441349Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

其次,mysql mysql-data-directory-to-a-new-location-on-ubuntu-16-04 i遵循这个url,然后尝试启动mysql,继续获取这个错误,https://www.digitalocean.com/community/tutorials/how-to-move-a-连接到localhost (111) (C1:2003)。这一次,mysqld.log文件中没有显示任何内容。

EN

回答 1

Unix & Linux用户

发布于 2018-08-22 05:16:54

消息说,"mysqld没有对目录的访问权限“。因此,您应该检查您创建的新目录的权限。该目录通常应该由用户mysql,组mysql拥有。您还应该检查新目录的所有父目录至少对mysql具有执行权限。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/464031

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档