一 问题描述
启动mariadb的时候报错:
2020-09-30 15:48:26 0 [ERROR] mysqld: File '/var/lib/mysql/aria_log_control' not found (Errcode: 13 "Permission denied")
2020-09-30 15:48:26 0 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2020-09-30 15:48:26 0 [ERROR] Plugin 'Aria' init function returned error.
2020-09-30 15:48:26 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2020-09-30 15:48:26 0 [Note] InnoDB: Using Linux native AIO
2020-09-30 15:48:26 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
2020-09-30 15:48:26 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
2020-09-30 15:48:26 0 [ERROR] InnoDB: os_file_get_status() failed on './ibdata1'. Can't determine file permissions
2020-09-30 15:48:26 0 [ERROR] Plugin 'InnoDB' init function returned error.
2020-09-30 15:48:26 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2020-09-30 15:48:26 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-09-30 15:48:26 0 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2020-09-30 15:48:26 0 [ERROR] Failed to initialize plugins.
2020-09-30 15:48:26 0 [ERROR] Aborting
二 解决办法
#临时关闭selinux(服务器重启后失效)
setenforce 0
#永久关闭
修改/etc/selinux/config文件
将SELINUX的值改为disabled