0

I have a development Airflow server. It uses MySQL as its database. In the mysqld settings, I have the user set to mysql.

However, the log is being written out as a different user named adm whenever the log is rolled over. I have confirmed I have set the desired user to mysql in the config, restarted the MySQL service to pick up this change, but it is still changing daily to adm. How can I make it so that the mysql user writes out the error log file after rolling over?

[mysqld]
#
# * Basic Settings
#
user            = mysql
...
# Error log - should be very few entries.
#

log_error = /var/log/mysql/error.log

Sample current directory:

drwxr-x---  2 mysql mysql  4096 Oct 23 13:37 .
drwxrwxr-x 13 root  syslog 4096 Oct 23 00:00 ..
-rw-r-----  1 adm   adm     0   Oct 23 00:00 error.log

Desired directory:

drwxr-x---  2 mysql mysql  4096 Oct 23 13:37 .
drwxrwxr-x 13 root  syslog 4096 Oct 23 00:00 ..
-rw-r-----  1 mysql mysql   0   Oct 23 00:00 error.log
Zack
  • 121
  • 2

1 Answers1

2

Barmar posted this as comment and solved it - it is indeed the log rotate configuration at /etc/logrotate.d/mysql-server.

The previous config line was create 640 mysql adm. I changed it to create 640 mysql mysql.

Zack
  • 121
  • 2