2

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?

4 Answers 4

3

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.

1

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.

4
  • 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") May 8, 2012 at 23:50
  • Need to use sudo. I updated the answer.
    – SpamapS
    May 11, 2012 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? May 12, 2012 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' May 12, 2012 at 2:58
1

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.

0

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. https://stackoverflow.com/questions/2198752/adding-a-start-up-via-command-line-ubuntu

Just give it a try.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .