Bug #12823 RPM Installation does not change group of existing mysql user during upgrade
Submitted: 26 Aug 2005 7:29 Modified: 19 Oct 2005 15:00
Reporter: Dino Tsoumakis Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S3 (Non-critical)
Version:MySQL-server-4.1.14-0.i386.rpm OS:Linux (SuSE 8.1 (2.4.21-273-default))
Assigned to: Lenz Grimmer CPU Architecture:Any

[26 Aug 2005 7:29] Dino Tsoumakis
During Upgrade from 4.1.13 to MySQL-server-4.1.14-0.i386.rpm on SuSE Linux 8.1 the new group 'mysql' is created and all existing database files are owned by mysql:mysql after installation.
But the previously existing mysql user was not changed to have the initial-group mysql. It still has the SuSE default group 'daemon'.
This results in wrong groups for all new files that are created after installation. If you create a new table, the files are still created as mysql:daemon. Also the .sock and the .pid have wrong groups.

drwx------    2 mysql    mysql       28464 Apr  8 09:56 kpi/
drwx------    2 mysql    mysql        1584 Jan 28  2005 mysql/
srwxrwxrwx    1 mysql    daemon          0 Aug 26 08:48 mysql.sock=
-rw-r--r--    1 mysql    mysql         222 Aug 26 08:48 mysqld.log
-rw-r--r--    1 mysql    mysql         425 Aug 19 08:49 mysqld.log.1.gz
-rw-r--r--    1 mysql    mysql         292 Aug 19 08:17 mysqld.log.2.gz
-rw-r--r--    1 mysql    mysql         196 Jul 26 10:34 mysqld.log.3.gz
-rw-rw----    1 mysql    mysql           0 Feb 16  2005 lx180.err
-rw-rw----    1 mysql    mysql     3935572 Apr 14 09:47 lx180.log
-rw-rw----    1 mysql    daemon          6 Aug 26 08:48 lx180.pid

How to repeat:
Upgrade from 4.1.13 using MySQL-server-4.1.14-0.i386.rpm on SuSE 8.1.

Suggested fix:
Do a 'usermod -g mysql mysql' after creation of the mysql group.
[31 Aug 2005 21:55] Jorge del Conde
Verified w/Suse 8.0
[13 Oct 2005 20:11] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

[13 Oct 2005 20:33] Lenz Grimmer
This should now be fixed for all upcoming releases (4.0.27, 4.1.16 and 5.0.15) - the MySQL-server RPM
now explicitely assigns the mysql user to the mysql user group in the postinstall script. This should probably be documented as a functionality change.
[19 Oct 2005 15:00] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

Documented feature change in 4.0.27, 4.1.16, and 5.0.15 changelongs. Closed.