CPANEL-35991 - Bug in MySQL 5.6 to 5.7 upgrade (error log)?

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
594
188
343
cPanel Access Level
DataCenter Provider
We've been performing MySQL 5.6 to 5.7 upgrades for some of our clients.

In MySQL 5.6 the --log-error is passed on the command line when MySQL is started. With MySQL 5.7 it's missing. I can see in the /etc/my.cnf.rpmnew file that there is a log-error=/var/log/mysqld.log set, but the upgrade is not merging that into /etc/my.cnf so it's not getting set.

On servers that just had MySQL 5.7 installed I can see the line in /etc/my.cnf, so this "seems" like a bug?
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
594
188
343
cPanel Access Level
DataCenter Provider
None set so it's defaulting to stderr:

Code:
# mysql -e "show variables" | egrep log_error
binlog_error_action     ABORT_SERVER
log_error       stderr
log_error_verbosity     3
I've been able to reproduce this on every system we've upgraded from 5.6 to 5.7
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
594
188
343
cPanel Access Level
DataCenter Provider
I believe all the ones we have done recently are CentOS V7.

While it's easy enough for us to add:

Code:
log-error=/var/log/mysqld.log
to my.cnf, this "seems" like something that the upgrade script should be taking care of.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,503
567
273
cPanel Access Level
Root Administrator
I created a CentOS 7 machine, specified that I wanted MySQL 5.6 on it, ran the cPanel installer, performed an upgrade to MySQL 5.7, and I confirmed the issue.

I've created a case with our developers so they can look into this a bit more and I'll post an update here once I have one.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,503
567
273
cPanel Access Level
Root Administrator
@ffeingol - our devs did some more testing with this and found this is the default value included with MySQL 5.7, so you're just seeing the default value change.

If the value is applied to /etc/my.cnf, that gets retained during the update, but the change isn't something special we're doing on the cPanel side of things as that's all handled with the MySQL upgrade process.
 

ffeingol

Well-Known Member
PartnerNOC
Nov 9, 2001
594
188
343
cPanel Access Level
DataCenter Provider
Ok, then this doc needs to be updated: The cPanel & WHM Log Files | cPanel & WHM Documentation with a qualifier that it will be in /var/log/mysql.log if you did a fresh install of MySQL 5.7, but if you upgrade, it wont' be there ;-)

We'll just add:

Code:
log-error=/var/log/mysqld.log
to /etc/my.cnf on the upgrade servers, but it would have been nice if the upgrade actually took care of this.

I know this is the way that things are distributed by MySQL/Oracle, but it's a bit frustrating that things are inconsistent on an install vs upgrade.