On Fri, Feb 15, 2008 at 05:56:52PM +0100, Sergei Golubchik wrote:
> On Feb 15, tim@stripped wrote:
> > ChangeSet@stripped, 2008-02-15 02:30:12-07:00, tsmith@stripped +1 -0
> > Bug #28555 Upgrading MySQL Fails to shut down old server and kills
> > socket file
> Why symlink was a problem ?
> What exactly did it cause ?
The Redhat RPM lists /var/lib/mysql in its %files specification, so when
it uninstalls it removes the directory.
If it were not a symlink, and there were other data files there, the
directory would not be empty, and it would fail to be removed. But
since it's just a symlink, it gets removed. This doesn't cause any real
data loss, but as Peter said it can cause some real worry when
By the way, MySQL's RPM doesn't specify /var/lib/mysql in %files, so it
is never touched on uninstall. Nor do we remove the 'mysql' user. I
guess this is a feature.
Another problem is that /etc/my.cnf from the Redhat RPM sets
basedir=/var/lib/mysql; this file isn't removed during upgrade, so these
settings are still in effect when MySQL's RPM tries to start up. It
causes our mysql.server to look for mysqld_safe in
/var/lib/mysql/bin/mysqld_safe. So the server won't start up.
Another problem with the symlink is that it makes 'chown -R mysql:mysql
/var/lib/mysql' not work. chmod -R doesn't follow the symlink. Since
Redhat's RPM removes the mysql user when it uninstalls, MySQL's adds a
'mysql' user (which winds up with a different user ID), but (due to
symlink) fails to set ownership on all the data files. The server will
fail to start, even if the basedir=/var/lib/mysql problem is solved.
-- Timothy Smith Production Engineer; Dolores, Colorado, USA
-- MySQL, www.mysql.com The best DATABASE COMPANY in the GALAXY!