Ubuntu – Mysql with upstart not starting

init.dMySQLUbuntuupstart

After an update this morning we are having some strange problems. First of all apt-get upgrade fails during the configuration with the a message that it was unable to start the service. We then attempted dpkg-reconfigure, apt-get purge followed by apt-get install and apt-get install --reinstall, but no luck.

After some time of trying to figure this out we then tried running the mysqld simply as root:

# mysqld --verbose
130809 15:31:15 [Note] Plugin 'FEDERATED' is disabled.
130809 15:31:15 InnoDB: The InnoDB memory heap is disabled
130809 15:31:15 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130809 15:31:15 InnoDB: Compressed tables use zlib 1.2.3.4
130809 15:31:15 InnoDB: Initializing buffer pool, size = 128.0M
130809 15:31:15 InnoDB: Completed initialization of buffer pool
130809 15:31:15 InnoDB: highest supported file format is Barracuda.
130809 15:31:15  InnoDB: Waiting for the background threads to start
130809 15:31:16 InnoDB: 5.5.32 started; log sequence number 357746282514
130809 15:31:17 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130809 15:31:17 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
130809 15:31:17 [Note] Server socket created on IP: '0.0.0.0'.
130809 15:31:17 [Note] Event Scheduler: Loaded 0 events
130809 15:31:17 [Note] mysqld: ready for connections.
Version: '5.5.32-0ubuntu0.12.04.2-log'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Ubuntu)

and it just work fine. So while digging through the log files we notived the following:

130809 10:15:37  InnoDB: Starting shutdown...
130809 10:15:39  InnoDB: Waiting for 200 pages to be flushed
130809 10:16:02  InnoDB: Shutdown completed; log sequence number 357736350943
130809 10:16:02 [Note] /usr/sbin/mysqld: Shutdown complete

/proc/self/fd/9: 1: /proc/self/fd/9: mysqld_get_param: not found
/proc/self/fd/9: 1: /proc/self/fd/9: mysqld_get_param: not found
/proc/self/fd/9: 1: /proc/self/fd/9: mysqld_get_param: not found
/proc/self/fd/9: 1: /proc/self/fd/9: mysqld_get_param: not found

10:15 was the time the upgrade was initiated. Each time we attempt to start the mysql-server using either the init.d script or the service mysql start command it will simply add another line like the last 4 lines.

So while we can run the server in a screen and start it manually each time the server reboots, it is quite annoying. Is there something we can do to fix it?

Best Answer

I've had the same issue since an update last Friday. There is an old Ubuntu bug that has been hanging around for quite a while that seems to be related:

https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/973951

There are various fixes/workarounds suggested in that thread (including a few purge+reinstall) but a recently-posted workaround did the trick for me and might work for you too:

https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/973951/comments/37

Good luck.

Related Topic