Can't create/write to file '/var/log/mariadb/mariadb.log'
3
votes
1
answer
10679
views
I'm troubleshooting a MySQL no-start on CentOS 7 VM. It is a bit unusual to see this since we have not made any configuration changes. The manual start command was taken from systemd logging. The error is the age old:
# /usr/bin/mysqld_safe --basedir=/usr
181221 17:42:49 mysqld_safe Logging to '/var/log/mariadb/mariadb.log'.
181221 17:42:49 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
/usr/bin/mysqld_safe_helper: Can't create/write to file '/var/log/mariadb/mariadb.log' (Errcode: 13)
According to [Red Hat Bugzilla – Bug 1061045](https://bugzilla.redhat.com/show_bug.cgi?id=1061045) ,
mysql:mysql
needs the appropriate permissions, which we seem to have:
[root@ftpit w]# ls -Al /var/log
total 52764
...
drwxrwx--- 2 mysql mysql 4096 Aug 16 11:05 mariadb
And:
[root@ftpit w]# ls -Al /var/log/mariadb/
total 99852
-rw-rw---- 1 mysql mysql 102138776 Dec 21 17:16 mariadb.log
And:
[root@ftpit w]# grep mysql /etc/passwd
mysql:x:27:27:MariaDB Server:/var/lib/mysql:/sbin/nologin
I also tried g-w
as shown in the bug report.
Where should I look next for this error? Or how do I fix it?
Asked by user141074
Dec 21, 2018, 10:51 PM
Last activity: Oct 30, 2024, 11:28 AM
Last activity: Oct 30, 2024, 11:28 AM