Can't start mysql - mysql respawning too fast, stopped

I finally figured out the issue. Basically, the definition of some parameters has been removed from the previous version of mysql and has been replaced with different names. To fix, in /etc/mysql/my.cnf, replace:

# Tom Added to ensure the server character set is set to utf8
default-character-set = utf8
default-collation     = utf8_general_ci

with:

# Tom Added to ensure the server character set is set to utf8
character_set_server  = utf8
collation_server      = utf8_general_ci

This is the associated launchpad bug report: https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/958120.

Or easily run:

# Miraz added dpkg-reconfigure
dpkg-reconfigure mysql-server-5.5

But make sure there's no old mysql version installation installed, if there was please remove:

# Miraz quick mysql package check
dpkg -l *mysql*

Innodb has a default setting (innodb_buffer_pool_size) which is set to 128M - this may be too large for your server (especially if you're using a small Amazon EC2 AMI - which I was) The fix that worked for me was to add the following line to /etc/mysql/my.cnf

innodb_buffer_pool_size = 16M

I wrote about this fix over here http://www.mlynn.org/2012/07/mysql-5-5-on-ubuntu-12-04-job-failed-to-start


I had a similar problem. It was frustrating because I couldn't see any error logs indicating what the problem was.

In my case, the value I had set for innodb_buffer_pool_size was too large for the memory of the server.

I found this out by running mysqld directly as the mysql user.

# su mysql
# mysqld

This way you actually see the error output.