Mysql修正datadir招致沒法啟動成績處理辦法。本站提示廣大學習愛好者:(Mysql修正datadir招致沒法啟動成績處理辦法)文章只能為提供參考,不一定能成為您想要的結果。以下是Mysql修正datadir招致沒法啟動成績處理辦法正文
centos6.2,停滯mysqld然後修正/etc/my.cnf datadir的地位,啟動mysqld提醒FAILED,檢查日記
120609 11:31:31 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
120609 11:35:12 mysqld_safe Starting mysqld daemon with databases from /mnt/hgfs/mysql_data
120609 11:35:13 [Warning] Can't create test file /mnt/hgfs/mysql_data/data.lower-test
120609 11:35:13 [Warning] Can't create test file /mnt/hgfs/mysql_data/data.lower-test
/usr/libexec/mysqld: Can't change dir to '/mnt/hgfs/mysql_data/' (Errcode: 13)
120609 11:35:13 [ERROR] Aborting
120609 11:35:13 [Note] /usr/libexec/mysqld: Shutdown complete
120609 11:35:13 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
新的datadir途徑確切沒成績,並且目次和目次下一切文件都是777權限,下層目次也有rx權限,只不外datadir和部屬文件owner都是root(由於我用虛擬機掛載的windows的文件體系)。後來想到應當是selinux弄的鬼,設置為permissive形式以後正常啟動mysqld。
[root@data selinux]# getenforce
Enforcing
[root@data selinux]# setenforce 0
[root@data selinux]# getenforce
Permissive
setenforce 1 設置SELinux 成為enforcing形式
setenforce 0 設置SELinux 成為permissive形式
完全封閉,vi /etc/selinux/config 修正 SELINUX=disabled
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted