Bug #71715 Permissions on /var/lib/mysql change on upgrade
Submitted: 14 Feb 2014 8:32 Modified: 11 Jun 2014 16:42
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:5.6.16 OS:Linux (RHEL6)
Assigned to: CPU Architecture:Any

[14 Feb 2014 8:32] Daniël van Eeden
Description:
My /var/lib/mysql is owned by myuser:mygroup (instead of mysql:mysql).

When I upgrade from 5.6.15 to 5.6.16 with 'yum localinstall *rpm' the permissions change to mysql:mysql

The directory is not owned by any package:
$ rpm -qf /var/lib/mysql
file /var/lib/mysql is not owned by any package

I've set 'user=myuser' in /etc/my.cnf

This prevents mysql from starting after the upgrade (permission denied on /var/lib/mysql/mysql.sock)

How to repeat:
See description

Suggested fix:
Be careful not to modify permissions and/or change permissions to the user defined in my.cnf
[14 Feb 2014 8:32] Daniël van Eeden
Set to serious as it results in a failure to start mysql after the upgrade.
[20 Feb 2014 12:08] MySQL Verification Team
Hello Daniel,

Thank you for the bug report.
Verified as described.

Thanks,
Umesh
[11 Jun 2014 16:42] Paul DuBois
Noted in 5.6.20, 5.7.5 changelogs.

Upgrades using RPM packages could change the ownership of an
installation directory.