国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > MySQL > 正文

Mysql修改datadir導致無法啟動問題解決方法

2024-07-24 12:42:48
字體:
來源:轉載
供稿:網(wǎng)友

 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的文件系統(tǒng))。后來想到應該是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

發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 大关县| 绩溪县| 哈巴河县| 大化| 台中市| 塔河县| 松原市| 乐平市| 兴安县| 阿鲁科尔沁旗| 刚察县| 锡林浩特市| 隆德县| 芜湖县| 洪江市| 拉萨市| 普陀区| 丁青县| 阿鲁科尔沁旗| 许昌县| 临海市| 西盟| 格尔木市| 马龙县| 台州市| 高安市| 汉沽区| 临沂市| 清镇市| 无极县| 淮北市| 垦利县| 兴文县| 遵义县| 布拖县| 孟州市| 北辰区| 新巴尔虎右旗| 鲜城| 海宁市| 东阿县|