Bug #28555 | Upgrading MySQL Fails to shut down old server and kills socket file | ||
---|---|---|---|
Submitted: | 21 May 2007 9:38 | Modified: | 20 Mar 2008 18:42 |
Reporter: | Peter Zaitsev (Basic Quality Contributor) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: General | Severity: | S3 (Non-critical) |
Version: | 5.0.41 | OS: | Linux |
Assigned to: | Timothy Smith | CPU Architecture: | Any |
Tags: | qc |
[21 May 2007 9:38]
Peter Zaitsev
[21 May 2007 13:51]
Daniel Fischer
Verified: Upgrade from RHEl4 MySQL 4.1.20 to MySQL MySQL 5.0.41 fails, the server fails to start afterward, and the symlink is removed.
[29 May 2007 13:54]
Mads Martin Joergensen
We cannot automatically support upgrading from one major version to another. I would very much prefer a %pre scriptlet testing the mysql version and in case it's so old, bail out with a comment that it's a major version upgrade.
[10 Jan 2008 20:49]
Omer Barnir
Workaround: Remove or move the old binaries to a different location, stop the running MySQL server
[15 Feb 2008 9:30]
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: http://lists.mysql.com/commits/42333 ChangeSet@1.2578, 2008-02-15 02:30:12-07:00, tsmith@ramayana.hindu.god +1 -0 Bug #28555 Upgrading MySQL Fails to shut down old server and kills socket file Check for an existing MySQL server package from a different vendor or major MySQL version. In such a case, refuse to install the server and recommend how to safely remove the old packages before installing the new ones.
[15 Feb 2008 10:56]
Timothy Smith
[build@centos4-x86 ~]$ rpm -q --whatprovides mysql-server no package provides mysql-server [build@centos4-x86 ~]$ echo $? 1 [build@centos4-x86 ~]$ sudo rpm -Uvh centos-rpms/mysql-*.rpm warning: centos-rpms/mysql-4.1.20-2.RHEL4.1.0.1.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821 Preparing... ########################################### [100%] 1:mysql ########################################### [ 33%] 2:mysql-devel ########################################### [ 67%] 3:mysql-server ########################################### [100%] [build@centos4-x86 ~]$ rpm -q --whatprovides mysql-server mysql-server-4.1.20-2.RHEL4.1.0.1 [build@centos4-x86 ~]$ sudo rpm -Uvh MySQL-*.i386.rpm warning: MySQL-shared-compat-enterprise-gpl-5.0.54a-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5 Preparing... ########################################### [100%] 1:MySQL-shared-compat-ent########################################### [ 17%] ****************************************************************** A MySQL server package (mysql-server-4.1.20-2.RHEL4.1.0.1) is installed. The current MySQL server package is provided by a different vendor (CentOS) than MySQL AB. Upgrading directly from MySQL 4.1 to MySQL 5.0 may not be safe in all cases. A manual upgrade is required. A recommended procedure is: - Ensure that you have a complete, working backup of your data and my.cnf files - Shut down the MySQL server cleanly - Remove the existing MySQL packages. Usually this command will list the packages you should remove: rpm -qa | grep -i '^mysql-' You may choose to use 'rpm --nodeps -ev <package-name>' to remove the package which contains the mysqlclient shared library. The library will be reinstalled by the MySQL-shared-compat package. - Install the new MySQL packages supplied by MySQL AB - Ensure that the MySQL server is started - Run the 'mysql_upgrade' program This is a brief description of the upgrade process. Important details can be found in the MySQL manual, in the Upgrading section. ****************************************************************** error: %pre(MySQL-server-enterprise-5.0.50-0.rhel4.i386) scriptlet failed, exit status 1 error: install: %pre scriptlet failed (2), skipping MySQL-server-enterprise-5.0.50-0.rhel4 2:MySQL-client-enterprise########################################### [ 33%] 3:MySQL-devel-enterprise ########################################### [ 50%] 4:MySQL-enterprise-debugi########################################### [ 67%] 5:MySQL-test-enterprise ########################################### [ 83%] [build@centos4-x86 ~]$ echo $? 6
[15 Feb 2008 10:59]
Joerg Bruehe
I sent a review by mail. The general approach seems fine to me, but I propose some changes in details.
[15 Feb 2008 17:49]
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: http://lists.mysql.com/commits/42394 ChangeSet@1.2578, 2008-02-15 10:48:41-07:00, tsmith@ramayana.hindu.god +1 -0 Bug #28555 Upgrading MySQL Fails to shut down old server and kills socket file Check for an existing MySQL server package from a different vendor or major MySQL version. In such a case, refuse to install the server and recommend how to safely remove the old packages before installing the new ones.
[15 Feb 2008 23:18]
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: http://lists.mysql.com/commits/42410 ChangeSet@1.2578, 2008-02-15 16:18:14-07:00, tsmith@ramayana.hindu.god +1 -0 Bug #28555 Upgrading MySQL Fails to shut down old server and kills socket file Check for an existing MySQL server package from a different vendor or major MySQL version. In such a case, refuse to install the server and recommend how to safely remove the old packages before installing the new ones.
[18 Feb 2008 19:03]
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: http://lists.mysql.com/commits/42514 ChangeSet@1.2578, 2008-02-18 12:03:39-07:00, tsmith@ramayana.hindu.god +1 -0 Bug #28555 Upgrading MySQL Fails to shut down old server and kills socket file Check for an existing MySQL server package from a different vendor or major MySQL version. In such a case, refuse to install the server and recommend how to safely remove the old packages before installing the new ones.
[18 Feb 2008 21:34]
Timothy Smith
Patch queued to 5.0-, 5.1-, and 6.0-build
[18 Feb 2008 21:35]
Timothy Smith
Also updated internals/build/NetworkRPMS/mysql-5.{0,1}.spec.in.
[25 Feb 2008 15:59]
Bugs System
Pushed into 5.1.24-rc
[25 Feb 2008 16:04]
Bugs System
Pushed into 5.0.58
[25 Feb 2008 16:06]
Bugs System
Pushed into 6.0.5-alpha
[20 Mar 2008 18:42]
Paul DuBois
Noted in 5.0.58, 5.1.24, 6.0.5 changelogs. For upgrading to a new major version using RPM packages (such as 4.1 to 5.0), if the installation procedure found an existing MySQL server running, it could fail to shut down the old server, but also erroneously removed the server's socket file. Now the procedure checks for an existing server package from a different vendor or major MySQL version. In such case, it refuses to install the server and recommends how to safely remove the old packages before installing the new ones.
[30 Mar 2008 9:08]
Jon Stephens
Fixed also noted in the 5.1.23-ndb-6.3.11 changelog.