Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The only way I was able to get MySql to start was to issue:


When I issued this command, it started rolling back some database transactions that were conflicted. I have tried issuing

service mysql stop

and all I get is

Unknown instance:

The output of 'ls -l /etc/init.d/mysql' is:

lrwxrwxrwx 1 root root 21 Apr 9 03:45 /etc/init.d/mysql -> /lib/init/upstart-job

The output of cat /etc/init/mysql.conf is:

# MySQL Service

description     "MySQL Server"
author          "Mario Limonciello <>"

start on runlevel [2345]
stop on starting rc RUNLEVEL=[016]

respawn limit 2 5

env HOME=/etc/mysql
umask 007

# The default of 5 seconds is too low for mysql which needs to flush buffers
kill timeout 300

pre-start script
    #Sanity checks
    [ -r $HOME/my.cnf ]
    [ -d /var/run/mysqld ] || install -m 755 -o mysql -g root -d /var/run/mysqld
    /lib/init/apparmor-profile-load usr.sbin.mysqld
    LC_ALL=C BLOCKSIZE= df --portability /var/lib/mysql/. | tail -n 1 | awk '{ exit ($4<4096) }'
end script

exec /usr/sbin/mysqld

post-start script
   for i in `seq 1 30` ; do
        /usr/bin/mysqladmin --defaults-file="${HOME}"/debian.cnf ping && {
            exec "${HOME}"/debian-start
            # should not reach this line
            exit 2
        if echo $statusnow | grep -q 'stop/' ; then
            exit 0
        elif echo $statusnow | grep -q 'respawn/' ; then
            exit 1
        sleep 1
    exit 1
end script

Now when I try to upload anything to WordPress I get a HTTP 500 error. I am assuming this is because MySQL is running under a different user. Any thoughts on how to get this working again?

Was suggested to post here from this post in stackoverflow

share|improve this question
Could you add the output of ls -l /etc/init.d/mysql? – Braiam Aug 9 '13 at 13:10
lrwxrwxrwx 1 root root 21 Apr 9 03:45 /etc/init.d/mysql -> /lib/init/upstart-job – Jesse Aug 9 '13 at 13:12
please edit your post and add the last comment, also, what's the content of cat /etc/init/mysql.conf? – Braiam Aug 9 '13 at 13:16
Edited post with results of cat /etc/init/mysql.conf – Jesse Aug 9 '13 at 13:22

Did you give a password for the root user? After the installation you should be prompted for a password. If you let it empty this could be the issue.

You need to set a password on more recent versions of mysql. Reconfigure the root password using:

sudo dpkg-reconfigure mysql-server-5.5

Then you should see the mysql server starting. Also it is now available using the serice command

sudo service mysql start|stop|status

But you will not need that right away since it is started on bootup

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.