package mysql-cluster-server-5.1 7.0.9-1ubuntu7 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 1

Bug #579732 reported by chansong
96
This bug affects 18 people
Affects Status Importance Assigned to Milestone
mysql-cluster-7.0 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Dear all,

When I upgrade from ubuntu 9.10 to 10.04 LTS I got error my laptop it hang at the step install mysql, and I must new install 10.04 LTS, when done I install java and install mysql but I continue got error about the cluster :

package mysql-cluster-server-5.1 7.0.9-1ubuntu7 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 1

How can i reinstall mysql now? because now it don't install any from mysql

Thanks,

Chuyen Nguyen

ProblemType: Package
DistroRelease: Ubuntu 10.04
Package: mysql-cluster-server-5.1 7.0.9-1ubuntu7
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic i686
AptOrdering:
 libdbd-mysql-perl: Remove
 mysql-cluster-server-5.1: Remove
Architecture: i386
Date: Thu May 13 08:25:39 2010
ErrorMessage: subprocess installed pre-removal script returned error exit status 1
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release i386 (20100429)
SourcePackage: mysql-cluster-7.0
Title: package mysql-cluster-server-5.1 7.0.9-1ubuntu7 failed to install/upgrade: subprocess installed pre-removal script returned error exit status 1

Revision history for this message
chansong (chuyennmth) wrote :
Revision history for this message
Philip Muškovac (yofel) wrote :

Seems like it couldn't stop the service.

Removing mysql-cluster-server-5.1 ...
 * Stopping MySQL database server mysqld
   ...fail!
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing mysql-cluster-server-5.1 (--remove):
 subprocess installed pre-removal script returned error exit status 1

affects: ubuntu → mysql-cluster-7.0 (Ubuntu)
Revision history for this message
Tom Helner (duffman) wrote :

I have run into this same issue with a fresh install of mysql-cluster-server-5.1 on 10.04 LTS.

The init scrip complained that the /etc/mysql/debian-start script was missing:
Setting up mysql-cluster-server-5.1 (7.0.9-1ubuntu7) ...
 * Stopping MySQL database server mysqld
   ...done.
 * Starting MySQL database server mysqld
   ...done.
/etc/init.d/mysql: line 116: /etc/mysql/debian-start: No such file or directory
invoke-rc.d: initscript mysql, action "start" failed.

For some reason /etc/mysql/debian-start is only in mysql-server-5.1, and not in mysql-cluster-server-5.1. So I extracted and "installed" that file from mysql-server-5.1, and attempted to reconfigure the package (dpkg-reconfigure -p low mysql-cluster-server-5.1" It prompts me for a new root database password, then on the next screen I get:

ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

Revision history for this message
Tom Helner (duffman) wrote :

There appears to be more wrong than the missing "debian-start" file. Using a fresh install of 10.04 I created the /etc/mysql/debian-start file before installing the mysql-cluster-server package. This time the install got a little further, but still failed:
ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

Looking at the database I see that the debian-sys-maint is not getting set up, and the root password is not being set:
mysql> use mysql;
mysql> select user,password,host from user;
+------+----------+------------+
| user | password | host |
+------+----------+------------+
| root | | localhost |
| root | | presque-vm |
| root | | 127.0.0.1 |
| root | | ::1 |
| | | localhost |
| | | presque-vm |
+------+----------+------------+
6 rows in set (0.00 sec)

Revision history for this message
Tom Helner (duffman) wrote :

Ok I now have a work-around procedure that seems to work for me.

1. On fresh install of 10.04 create /etc/mysql/ and add debian-start file (extracted from mysql-server-5.1 package).
   - If this step is skipped the configuration of the mysql-cluster-server-5.1 will hang.

2. Install mysql-cluster-server-5.1
 # aptitude install mysql-cluster-server-5.1
   - This will error out w/ the following error:
 <ERROR 1045 (28000): Access denied for user 'debian-sys-maint'@'localhost' (using password: YES)

3. Fix mysql.user table
 # mysql -u root
   - no password should be required since it did not get set up correctly in the package configuration.
  a. Verify table appears as I posed in previous comment.
     mysql> select user,password,host from mysql.user;
  b. Delete incomplete entries
     mysql> DROP USER ''@'localhost';
     mysql> DROP USER ''@'db3';
  c. Create debian-sys-maint user
     mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'debian-sys-maint'@'localhost' WITH GRANT OPTION;
  d. Set passwords for root & debian-sys-maint users (for debian-sys-maint use the password listed in /etc/mysql/debian.cnf)
     mysql> UPDATE mysql.user SET Password=PASSWORD('NEW-PASSWORD') WHERE user='debian-sys-maint';
     mysql> UPDATE mysql.user SET Password=PASSWORD('NEW-PASSWORD') WHERE user='root';
     mysql> FLUSH PRIVILEGES;
4. Test that debian-sys-maint user is working
 # mysql -u debian-sys-maint -pNEW-PASSWORD
5. Restart of database should now work without errors
 # /etc/init.d/mysql restart

Revision history for this message
Stéphane Graber (stgraber) wrote :

Here's a patch for that bug, once test-builded it'll be updated to lucid-proposed for community testing before going into lucid-updates.

Changed in mysql-cluster-7.0 (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mysql-cluster-7.0 - 7.0.9-1ubuntu8

---------------
mysql-cluster-7.0 (7.0.9-1ubuntu8) maverick; urgency=low

  * Add missing debian-start (LP: #579732)
 -- Stephane Graber <email address hidden> Tue, 17 Aug 2010 17:07:04 -0400

Changed in mysql-cluster-7.0 (Ubuntu):
status: Triaged → Fix Released
tags: added: patch
Revision history for this message
Kippenijzer (5-launchpad-kippenijzer-nl) wrote :

Is there going to be a follow-up besides the package mysql-cluster-7.0 - 7.0.9-1ubuntu8 build-report that shows that it fails?

Revision history for this message
mores (stephen-more) wrote :

I too am having this problem...

I would like to help test the new install. How can I install 7.0.9-1ubuntu8 ?

Revision history for this message
mkovac (mkovac) wrote :

When will this version of the package appear in Lucid? I have lucid-proposed and lucid-backports in sources.list, but still nothing.

Revision history for this message
Sergei (msergei) wrote :

This bug shows that Fix was released but when installing 10.04.3 and mysql-cluster-server I'm hitting this problem. Ubuntu updates, proposed and security repositories are all enabled.

Revision history for this message
Sergei (msergei) wrote :

Just tried to install mysql-cluster-server on Ubuntu Server 11.10 which is A YEAR AND A HALF after the bug was issued and the issue is still here.

Setting up mysql-cluster-client-5.1 (7.1.9a-0ubuntu2) ...
Setting up mysql-cluster-server-5.1 (7.1.9a-0ubuntu2) ...
 * Stopping MySQL database server mysqld [ OK ]
chown: cannot access `/var/run/mysqld': No such file or directory
 * Starting MySQL database server mysqld [ OK ]
/etc/init.d/mysql: line 116: /etc/mysql/debian-start: No such file or directory
invoke-rc.d: initscript mysql, action "start" failed.

Revision history for this message
Zoltan Lippai (1-zoli) wrote :

I can confirm that the problem still exists. I was trying to do a clean install on Ubuntu 11.10 with this package:
Package: mysql-cluster-server-5.1
Source: mysql-cluster-7.0
Version: 7.1.9a-0ubuntu2

It gave me the error mentioned above.
Also, duffmans workaround was perfect, thank you for sharing it!

So, the bug is definitely not fixed!

Revision history for this message
stefan (sschloesser) wrote :

Same for me on a fresh 11.10 - this problem is still open.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.