Unable to start mysql after upgrade from repository. It was an upgrade over the 5.5 version. package mysql-server-5.5 5.5.32-0ubuntu0.12.04.1 failed to install/upgrade: el subproceso instalado el script post-installation devolvió el código de salida de error 1

Bug #1208729 reported by Luis Navalpotro
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
mysql-5.5 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

In three different machines mysql 5.5 stopped working after Ubuntu upgrade (the same upgrade in the three machines, the same ubuntu version and two of them 64bit and one 32 bit version).
None of the three machines are no longer capable of configuring mysql server having to reinstall mysql-server-5.5 in order to get it working.

Configurando mysql-server-5.5 (5.5.32-0ubuntu0.12.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error al procesar mysql-server-5.5 (--configure):
 el subproceso instalado el script post-installation devolvió el código de salida de error 1
Se encontraron errores al procesar:
 mysql-server-5.5

ProblemType: Package
DistroRelease: Ubuntu 12.04
Package: mysql-server-5.5 5.5.32-0ubuntu0.12.04.1
ProcVersionSignature: Ubuntu 3.2.0-51.77-generic 3.2.48
Uname: Linux 3.2.0-51-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.3
AptOrdering:
 mysql-server-5.5: Install
 mysql-server-5.5: Configure
Architecture: amd64
Date: Tue Aug 6 10:04:33 2013
DuplicateSignature: package:mysql-server-5.5:5.5.32-0ubuntu0.12.04.1:el subproceso instalado el script post-installation devolvió el código de salida de error 1
ErrorMessage: el subproceso instalado el script post-installation devolvió el código de salida de error 1
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120823.1)
Logs.var.log.daemon.log:

MarkForUpload: True
MySQLConf.etc.mysql.conf.d.mysqld.safe.syslog.cnf:
 [mysqld_safe]
 syslog
MySQLVarLibDirListing: ['seo', 'debian-5.5.flag', 'ib_logfile1', 'test', 'mysql', 'mysql_upgrade_info', 'ib_logfile0', 'pentaho', 'performance_schema', 'ibdata1']
SourcePackage: mysql-5.5
Title: package mysql-server-5.5 5.5.32-0ubuntu0.12.04.1 failed to install/upgrade: el subproceso instalado el script post-installation devolvió el código de salida de error 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Luis Navalpotro (luisnavalpotro) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Yolanda Robla (yolanda.robla) wrote :

Thanks for reporting this
According to your logs, there seems to be a problem with permissions:

130806 10:04:33 [ERROR] /usr/sbin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pi' (Errcode: 13)
130806 10:04:33 [ERROR] Can't start server: can't create PID file: Permission denied

Please can you check that you have the proper write permissions on that /var/run/mysqld folder?

Best
Yolanda

Changed in mysql-5.5 (Ubuntu):
status: New → Invalid
Revision history for this message
perriman (chuchiperriman) wrote :

Same problem. The permissions:

drwxr-xr-x 2 mysql root 40 ago 9 15:52 mysqld

Revision history for this message
perriman (chuchiperriman) wrote :

More info if I try to reinstall mysql-server:

chuchi@ch-quiter:~$ sudo apt-get install --reinstall mysql-server
.......

E: Internal Error, No file name for mysql-server:amd64

Changed in mysql-5.5 (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
perriman (chuchiperriman) wrote :

You can start mysqld with the command:

sudo -u mysql mysqld

This command works fine but:

sudo /etc/init.d/mysql start
sudo service mysql start

fails

Revision history for this message
Angel Guzman Maeso (shakaran) wrote :

I see this error in each upgrade. Looking in mysql error log while mysql update his package appears:

tail -F /var/log/mysql/error.log

ERROR: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE user ADD column Show_view_priv enum('N','Y') CHARACTER SET utf8 NOT ' at line 1

apt-source mysql-server

Grepping by:

grep -rin Show_view_priv

Shows that:
debian/mysql-server-5.5.postinst

If failing to add new columns because the fix is already done, then we are getting duplicate error columns messages, That kills the start of mysql.

 replace_query=`echo -e \
        "USE mysql\n" \
        "REPLACE INTO user SET " \
        " host='localhost', user='debian-sys-maint', password=password('$pass'), " \
        " Select_priv='Y', Insert_priv='Y', Update_priv='Y', Delete_priv='Y', " \
        " Create_priv='Y', Drop_priv='Y', Reload_priv='Y', Shutdown_priv='Y', " \
        " Process_priv='Y', File_priv='Y', Grant_priv='Y', References_priv='Y', " \
        " Index_priv='Y', Alter_priv='Y', Super_priv='Y', Show_db_priv='Y', "\
        " Create_tmp_table_priv='Y', Lock_tables_priv='Y', Execute_priv='Y', "\
        " Repl_slave_priv='Y', Repl_client_priv='Y', Create_view_priv='Y', "\
        " Show_view_priv='Y', Create_routine_priv='Y', Alter_routine_priv='Y', "\
        " Create_user_priv='Y', Event_priv='Y', Trigger_priv='Y', Create_tablespace_priv='Y' "`;
    fix_privs=`echo -e \
        "USE mysql;\n" \
        "ALTER TABLE user ADD column Create_view_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
        "ALTER TABLE user ADD column Show_view_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
        "ALTER TABLE user ADD column Create_routine_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
        "ALTER TABLE user ADD column Alter_routine_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
        "ALTER TABLE user ADD column Create_user_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
        "ALTER TABLE user ADD column Event_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
        "ALTER TABLE user ADD column Trigger_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " \
        "ALTER TABLE user ADD column Create_tablespace_priv enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N'; " `

After see this. I found this debian upstream bug unresolved http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=708176. So probably this is a duplicate. This need raise priority to severity, because all future mysql-server upgrades will fail applying this code if no change. This is specially important if ubuntu wants market in cloud servers with mysql.

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

Other bug subscribers

Remote bug watches

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