Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

After upgrading to Pangolin, mysqld is not starting on boot. I've looked into various other MySQL issues with the Pangolin release, and I haven't seen the same issue that other people are having (mysqld bouncing, etc). Once I run it from the command line, it runs just fine.

Where do I add the command to start the service on boot?

share|improve this question
add comment

4 Answers

up vote 1 down vote accepted

While I was looking for a solution to the same symptom, I found out there are a lot of things that can go wrong and prevent mysql(d) from starting. If you can manage to start it from the command line with the proper user:

sudo -u mysql mysqld

And that conversely it fails as a service:

root@my-linode:~# service mysql start
start: Job failed to start

Then check the upstart log in /var/log/upstart/mysql.log. If you find the following error message:

[ERROR] Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!

Then you've found the culprit. To fix it, specify the mysql user in /etc/mysql/my.cnf

user=mysql

Restart with start mysql and you should be good.

Again, there are many possible cause to this error (apparmor, incorrect privileges on the socket file, insufficient disk space, insufficient memory during the upgrade to mention a few I stumbled upon). This is only one of them. Thanks to this guy.

share|improve this answer
add comment

sudo service mysql start should start mysql. It is an upstart job, so the full job can be seen at /etc/init/mysql.conf

You probably need to check /var/log/mysql*, as there may be issues with the upgrade table process that are causing problems.

share|improve this answer
    
Here's what I'm getting with service mysql start: start: Rejected send message, 1 matched rules; type="method_call", sender=":1.79" (uid=1000 pid=6430 comm="start mysql ") interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init") –  b. e. hollenbeck May 8 '12 at 23:50
    
Need to use sudo. I updated the answer. –  SpamapS May 11 '12 at 18:30
    
Now I get: start: Job failed to start There's nothing in either mysql log file - they're at 0 KB. Could it be upstart? –  b. e. hollenbeck May 12 '12 at 2:55
    
I checked the upstart mysql.log file: AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at line 44: Could not open 'local/usr.sbin.mysqld' –  b. e. hollenbeck May 12 '12 at 2:58
add comment

This solved it for me during the 11.xx 12.04 upgrade:

sudo touch /etc/apparmor.d/local/usr.sbin.mysq

I could start it in safe mode but not in regular mode. Hope this helps.

share|improve this answer
add comment

Well here is the problem, maybe your's is a domain problem. Mysql would have been installed in the other user profile and just could not start due to profile issues. Well here is one thing I found for you.
http://www.thegeekstuff.com/2009/07/ubuntu-open-applications-automatically-during-system-startup/

and a question similar to you is having the problem. So I found the following answer for you. http://stackoverflow.com/questions/2198752/adding-a-start-up-via-command-line-ubuntu

Just give it a try.

share|improve this answer
add comment

Your Answer

 
discard

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.