分类: 系统运维
2013-03-18 11:21:09
在数据库中用select * into outfile '/home/mysql/data.sql'导出数据时
shell提示错误:
ERROR 1 (HY000): Can't create/write to file '/home/mysql/data.sql' (Errcode: 13)
在确认不是权限的问题后,用下面方法解决
setsebool -P mysqld_disable_trans=1
执行上述命令后,
重启mysql服务,shell不会在报错
shell>getsebool -a可以查看当前的对系统一系列守护进程的权限情况。
lpd_disable_trans --> off
mail_read_content --> off
mailman_mail_disable_trans --> off
mdadm_disable_trans --> off
mozilla_read_content --> off
mysqld_disable_trans --> off
nagios_disable_trans --> off
named_disable_trans --> off
named_write_master_zones --> off
nfs_export_all_ro --> on
nfs_export_all_rw --> on
nfsd_disable_trans --> off
nmbd_disable_trans --> off
nrpe_disable_trans --> off
-P表示 是永久性设置,否则重启之后又恢复预设值。