我试图在CentOS 6上使用SE
Linux启动
MySQL但是我收到以下错误.
131212 09:08:08 MysqLd_safe MysqLd from pid file /var/run/MysqLd/MysqLd.pid ended 131212 09:08:58 MysqLd_safe Starting MysqLd daemon with databases from /u/MysqL 131212 9:08:58 [Warning] Can't create test file /u/MysqL/webserver.lower-test 131212 9:08:58 [Warning] Can't create test file /u/MysqL/webserver.lower-test ^G/usr/libexec/MysqLd: Can't change dir to '/u/MysqL/' (Errcode: 13) 131212 9:08:58 [ERROR] Aborting
我们已经使用许多其他服务器设置MysqL,但是这里的区别在于MysqL datadir与标准的/vat/lib.MysqL位于不同的分区中.而是在/ u / MysqL中.
这是/etc/my.cnf
[MysqLd] datadir=/u/MysqL user=MysqL # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 max_allowed_packet = 32M [MysqLd_safe] log-error=/var/log/MysqLd.log pid-file=/var/run/MysqLd/MysqLd.pid
这是MysqL目录的权限
drwxr-xr-x. MysqL MysqL system_u:object_r:MysqLd_db_t:s0 MysqL
这是/ u / MysqL目录中某个directorys的权限
drwx------. MysqL MysqL system_u:object_r:MysqLd_db_t:s0 databasefolder
有没有人对如何解决这个问题有任何想法?我可以确认关闭SELinux可以解决问题所以它必须是某种SELinux权限问题.
谢谢