systemctl start mariadb で起動すると、「Can't create database directory '/var/lib/mysql/mysql.sock'」となり、起動できないので、selinux を無効(Permissive)にして起動しているが、有効(Enforcing)にした状態で、起動するには、どのような設定にすればいいのでしょうか。
【mariadb.log】
181016 14:33:43 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 ./ib_logfile0
InnoDB: File operation call: 'aio write'.
InnoDB: Cannot continue operation.
181016 14:33:43 mysqld_safe Number of processes running now: 0
181016 14:33:43 mysqld_safe mysqld restarted
181016 14:33:43 [ERROR] mysqld: File '/mnt/data01/mariadb/aria_log_control' not found (Errcode: 13)
181016 14:33:43 [ERROR] mysqld: Got error 'Can't open file' when trying to use aria control file '/mnt/data01/mariadb/aria_
log_control'
181016 14:33:43 [ERROR] Plugin 'Aria' init function returned error.
181016 14:33:43 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
181016 14:33:43 InnoDB: The InnoDB memory heap is disabled
181016 14:33:43 InnoDB: Mutexes and rw_locks use GCC atomic builtins
181016 14:33:43 InnoDB: Compressed tables use zlib 1.2.7
181016 14:33:43 InnoDB: Using Linux native AIO
181016 14:33:43 [Note] /usr/libexec/mysqld (mysqld 5.5.60-MariaDB) starting as process 25701 ...
181016 14:33:43 [Warning] Can't create test file /mnt/data01/mariadb/br-smp-p01.lower-test
181016 14:33:43 InnoDB: Initializing buffer pool, size = 128.0M
181016 14:33:43 InnoDB: Completed initialization of buffer pool
181016 14:33:43 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'.
InnoDB: Cannot continue operation.
181016 14:33:43 mysqld_safe mysqld from pid file /var/run/mariadb/mariadb.pid ended
181016 14:33:44 mysqld_safe Fatal error Can't create database directory '/var/lib/mysql/mysql.sock'
【OS】
CentOS Linux release 7.1.1503 (Core)
【設定状況】
ls -l /var/lib/mysql
lrwxrwxrwx. 1 root root 19 10月 16 10:41 /var/lib/mysql -> /mnt/data01/mariadb
ls -l /mnt/data01
drwxr-xr-x. 5 mysql mysql 4096 10月 16 11:54 mariadb
【selinux】
/etc/sysconfig/selinux の中身
SELINUX=permissive ## enforcing から変更
SELINUXTYPE=targeted
回答3件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/10/16 05:46
2018/10/16 06:07