Mysql修改datadir导致无法启动问题解决方法
2015-02-13 00:00
986 查看
centos6.2,停止mysqld然后修改/etc/my.cnf datadir的位置,启动mysqld提示FAILED,查看日志
新的datadir路径确实没问题,而且目录和目录下所有文件都是777权限,上层目录也有rx权限,只不过datadir和下属文件owner都是root(因为我用虚拟机挂载的windows的文件系统)。后来想到应该是selinux搞的鬼,设置为permissive模式之后正常启动mysqld。
setenforce 1 设置SELinux 成为enforcing模式
setenforce 0 设置SELinux 成为permissive模式
彻底关闭,vi /etc/selinux/config 修改 SELINUX=disabled
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
相关文章推荐
- Mysql修改datadir导致无法启动问题解决方法
- CentOS 7 下 修改Mysql 5.7datadir的位置,无法启动的问题解决
- MySQL服务在windows系统中修改Data路径后无法启动问题解决
- CentOS7中MariaDB修改datadir后无法启动的解决方法
- MySQL中配置文件my.cnf因权限问题导致无法启动的解决方法
- MySQL在windows系统中修改datadir路径后无法启动问题,报错1067
- 碰到MySQL无法启动1067错误问题解决方法
- oracle修改SGA后无法启动问题分析及解决方法
- 从源码安装mysql无法定位basedir问题的解决方法
- Linux修改fstab引起系统无法启动问题的解决方法
- grub rescue 方法,解决重装windows系统导致的linux无法启动问题
- 一次误修改sga_max_size值过大后导致数据库无法启动的解决方法
- 修改mysql的my.ini文件,导致mysql服务1067启动失败的解决方法
- oracle修改 11g processes参数导致:无法启动解决方法 shared memory realm does not exists
- 远程Linux服务器修改Mysql数据库编码及解决编码修改后Mysql无法启动的问题
- 一次权限修改导致的RAC无法正常启动的问题的解决
- 计算机磁盘硬件问题导致Windows无法启动的解决方法
- oracle修改SGA后无法启动问题分析及解决方法
- fstab修改有误导致无法启动的解决方法
- hadoop 安装出现的几种异常的处理方法,hadoop无法启动,no namenode to stop问题的解决方法,no datanode