LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   MySQL - start: Job failed to start (https://www.linuxquestions.org/questions/ubuntu-63/mysql-start-job-failed-to-start-4175503017/)

czezz 04-25-2014 07:34 PM

MySQL - start: Job failed to start
 
My system: Ubuntu 12.04.3 LTS (GNU/Linux 3.8.0-33-generic x86_64)
I have turned off MySQL server to do the backup.
Code:

# /usr/sbin/service mysql stop
After the backup was done I tried to start it but it surprised me with this:
Code:

# /usr/sbin/service mysql start
start: Job failed to start

On the syslog I see following entry:

Code:

Apr 26 02:22:17 webserver02 kernel: [  282.914245] type=1400 audit(1398471737.767:51): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2079 comm="apparmor_parser"
Apr 26 02:22:18 webserver02 kernel: [  283.950266] type=1400 audit(1398471738.803:52): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2107 comm="apparmor_parser"
Apr 26 02:22:19 webserver02 kernel: [  284.986266] type=1400 audit(1398471739.843:53): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=2135 comm="apparmor_parser"

And important thing is here:
Code:

cat /var/log/upstart/mysql.log
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

I did NOT do any upgrade or modification. I simply turned MySQL off.
I read all google advises and none work for me.

Anyone have idea what to do now ?

czezz 04-26-2014 04:24 AM

I did more search in my system today and I found this in the log:
Code:

# cat /var/log/mysql/error.log
...
/usr/sbin/mysqld: Can't create/write to file '/tmp/ib7GhU3n' (Errcode: 13)
...

I checked, and permission to my /tmp was wrong!
I simply restored proper permission to /tmp and MySQL works back again.
Code:

chmod 1777 /tmp
Hope this will help someone in the future :)

yustto 03-12-2018 06:07 AM

Czezz- Good stuff
 
Czezz solution worked for me. Seems to be permissions issues causing the logs not to be writable.


All times are GMT -5. The time now is 07:29 AM.