Quantcast
Viewing all articles
Browse latest Browse all 7239

Problems writing to mysql log files in /var/log/mysql (no replies)

Hello all,

I decided to change the location of the mysql log files. I edited my.cnf to look like this:

log-error=/var/log/mysql/mysqld.log
log = /var/log/mysql/mysql.log
long_query_time =1
log-slow-queries = /var/log/mysql/mysql-slow.log

After restarting the server, the mysqld.log is logging errors in the new location, bug it reports that it can't find /var/log/mysql.log or mysql-slow.log. Here is the whole message:

/usr/sbin/mysqld: File '/var/log/mysql/mysql.log' not found (Errcode: 13)
101005 23:10:28 [ERROR] Could not use /var/log/mysql/mysql.log for logging (error 13). Turning logging off for the whole duration of the MySQL server process. To turn it on again: fix the cause, shutdown the MySQL server and restart it.

I have made sure that /var/log/mysql is owned by mysql.mysql and recursively, everything below it is owned my mysql.mysql and files are 664.

chown -R mysql.mysql /var/log/mysql
chmod -R 664 /var/log/mysql/

Can anyone enlighten me as to why these two log files can't be written to.

Viewing all articles
Browse latest Browse all 7239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>