首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >mysqld:无法创建/写入文件(错误代码: 13)

mysqld:无法创建/写入文件(错误代码: 13)
EN

Stack Overflow用户
提问于 2014-05-02 17:12:08
回答 1查看 4K关注 0票数 6

我最近在我的archlinux机器上安装了mariadb,并且想用不同的data和tmp目录运行mysqld

代码语言:javascript
复制
[mysqld]
user        = mysql
port        = 3306
datadir     = <datapath>
tmpdir      = <datapath>/tmp

运行mysqld时,我收到以下错误消息:

代码语言:javascript
复制
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins 
InnoDB: Compressed tables use zlib 1.2.8
InnoDB: Using Linux native AIO
[ERROR] mysqld: Can't create/write to file '<datapath>/tmp/ib8dOkCX' (Errcode: 13)
InnoDB: Error: unable to create temporary file; errno: 13 
[ERROR] Plugin 'InnoDB' init function returned error. 
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[ERROR] mysqld: Can't create/write to file '<datapath>/aria_log_control' (Errcode: 13)
[ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '<datapath>/aria_log_control'
[ERROR] Plugin 'Aria' init function returned error.
[ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
[ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting

[Note] mysqld: Shutdown complete

我已经确保mysql用户是所有者,并且对data和tmp目录具有适当的权限。

当以root身份运行mysqld时,一切工作正常。在使用默认的tmpdir时,我仍然会在创建/写入文件/aria_log_control时出现错误。有谁知道我哪里失败了吗?

EN

回答 1

Stack Overflow用户

发布于 2018-06-09 03:43:31

您应该将<datapath>替换为包含临时文件夹的数据文件的实际路径

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

https://stackoverflow.com/questions/23424605

复制
相关文章

相似问题

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