Bug #4038 rpm postinstall script leaves files as owned by root
Submitted: 7 Jun 2004 14:31 Modified: 9 Jun 2004 17:10
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Installing Severity:S2 (Serious)
Version:4.0 OS:Linux (linux)
Assigned to: Guilhem Bichot CPU Architecture:Any

[7 Jun 2004 14:31] Guilhem Bichot
see how-to-repeat

How to repeat:
Have /etc/my.cnf:
(the important thing is to point to elsewhere than /var/lib/mysql).
Login as root:
rpm -i MySQL-server-4.0.20-0.i386.rpm
This silently calls mysql_install_db which runs mysqld as root and so you get
this in /binlogs:
[root@gbichot2 logiciels]# ll /binlogs/
total 8
-rw-rw----    1 root     root           79 Jun  7 11:40 binlog.001
-rw-rw----    1 mysql    mysql           0 Jun  7 11:40 binlog.002
-rw-rw----    1 root     root           20 Jun  7 11:40 binlog.index
Later, when mysqld is started with "service mysql start", it starts as
mysql and so cannot read binlog.index, thus causing replication to

Suggested fix:
Need to fix mysql_install_db to be able to start mysqld as a certain user, and to fix mysql.spec to call mysql_install_db --user=mysql
[9 Jun 2004 17:10] Guilhem Bichot
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:

Fixed in ChangeSet@1.1851, 2004-06-09 17:07:11+02:00, guilhem@mysql.com