Sarajevo, Bosnia and Herzegovina

Can’t start mysql – mysql respawning too fast, stopped on Ubuntu 12.04

So my server don’t want to run mysql and in syslog I can find multiple errors like

miralem-ubuntu kernel: [ 882.914291] type=1400 audit(1384529343.038:33): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=268

Solution:

Go to  /etc/mysql/my.cnf

and change/or add :

default-character-set = utf8
default-collation = utf8_general_ci

to

character_set_server = utf8
collation_server = utf8_general_ci

After that you need to reconfigure your server :

dpkg-reconfigure mysql-server-5.5

and remove temp old files

dpkg -l *mysql*