标签:流水账 启动 mysql selinux ERROR InnoDB connect error
linux 下启动 mysql 报错(#为提示字符)
# systemctl restart mysqld
报错 如下
[ERROR] InnoDB: Operating system error number 13 in a file operation. [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory. [ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions [ERROR] InnoDB: Plugin initialization aborted with error Generic error [ERROR] Plugin 'InnoDB' init function returned error. [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed. [ERROR] Failed to initialize builtin plugins. [ERROR] Aborting
此时考虑是由 selinux 引起的问题
临时方案 : 关闭 selinux
1 # getenforce # 查看selinux 状态 “Enforcing” 为selinux 强制开启 。“Permissive” 为 selinux 只 监控不阻止命令 执行 2 # setenforce 0 # 修改selinux为 Permissive
selinux 修改后,重新尝试 启动mysql ,成功。
再次修改selinux为 Enforcing 后 ,重新出现“Operating system error number 13 in a file operation.”
问题:如何保持selinux 的强安全模式 且 mysql 服务正常 ?
答: 修改 selinux的mysql安全配置项
1 # getsebool -a |grep mysql 2 mysql_connect_any --> off 3 selinuxuser_mysql_connect_enabled --> off
问:如何打开 配置项
1 # setsebool -P selinuxuser_mysql_connect_enabled on 2 # setsebool -P mysql_connect_any on
修改selinux为 Enforcing 后 ,mysql 服务正常 。
参考文献:
https://www.percona.com/doc/percona-server/8.0/security/selinux.html
标签:流水账,启动,mysql,selinux,ERROR,InnoDB,connect,error 来源: https://www.cnblogs.com/HeisenbergUncertainty/p/16343229.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。