我最近在我的archlinux盒子上安装了mariadb,想用不同的数据和tmp目录运行mysqld
[mysqld]
user = mysql
port = 3306
datadir = <datapath>
tmpdir = <datapath>/tmp
运行mysqld时,我收到以下错误消息:
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用户是所有者,并且对数据和tmp目录具有适当的权限。
以root身份运行mysqld时,一切正常。当使用默认的tmpdir时,我仍然在创建/写入文件/ aria_log_control时收到错误。谁知道我失败的地方?
答案 0 :(得分:0)
您应该将<datapath>
替换为包含文件夹tmp