在做数据库主从设置的时候,my.cnf配置了log-bin= mysql-bin,启动报以下错误
[Warning] Can't create test file /XXXX/XXXX/data/localhost..lower-test
2022-08-09T02:53:20.604003Z 0 [Warning] Can't create test file /XXX/mysql/data/localhost.
mysqld: File './mysql-bin.index' not found (Errcode: 13 - Permission denied)
网上都说是权限问题,加
chown -R mysql:mysql /usr/local/mysql(自己的数据库安装路径)
我试了不行,我的解决是
修改/etc/selinux/config 文件
将SELINUX=enforcing改为SELINUX=disabled
重启数据库。。正常!