lz用的是centos,mysql所在的分区慢了,要移到其他盘,把/var/lib/mysql的内容复制过去了,权限和之前一样,my.cnf, /etc/init.d/mysqld和 /usr/bin/mysqld_safe 的相应内容也变了,但重新启动mysql服务总是失败,selinux也设置为permissive了。 log日志显示:
InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'. 网上的流传的帖子,简单的就那么几句话(真是站着说话不腰疼),详细还提到了selinux的因素,但lz都试一一过了,还是不行,所以来此请各位csdn区的牛人相助,lz解决问题后,一定完完整整地把详细方法贴到网上,以正视听
InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'. 网上的流传的帖子,简单的就那么几句话(真是站着说话不腰疼),详细还提到了selinux的因素,但lz都试一一过了,还是不行,所以来此请各位csdn区的牛人相助,lz解决问题后,一定完完整整地把详细方法贴到网上,以正视听
只要把data目录move到另一个分区,然后做一个link就完了。给相应原权限。
这是原来var/lib/mysql目录的属性:
drwxr-xr-x. mysql mysql system_u:object_r:mysqld_db_t:s0 mysql
这是新的mysql的目录属性:
drwxr-xr-x. mysql mysql unconfined_u:object_r:mysqld_db_t:s0 mysql
能否说详细一些呢? mysql.sock的link我已经做好了,你说做目录的link? 那这样子的话,my.cnf中的datadir是指向新目录还是老目录?
楼主出现的错误是权限设置问题, 你再检查一下