Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 04-25-2014, 08:34 PM   #1
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 868

Rep: Reputation: 40
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.
# /usr/sbin/service mysql stop
After the backup was done I tried to start it but it surprised me with this:
# /usr/sbin/service mysql start
start: Job failed to start
On the syslog I see following entry:

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:
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 ?

Last edited by czezz; 04-28-2014 at 04:50 AM.
Old 04-26-2014, 05:24 AM   #2
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 868

Original Poster
Rep: Reputation: 40
I did more search in my system today and I found this in the log:
# 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.
chmod 1777 /tmp
Hope this will help someone in the future
Old 03-12-2018, 07:07 AM   #3
LQ Newbie
Registered: Mar 2018
Posts: 1

Rep: Reputation: Disabled
Czezz- Good stuff

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] MySQL Daemon failed to start - no mysql.sock file jastanle84 Linux - Software 9 10-10-2011 03:54 PM
mysql failed to start. reinstall failed either!!! gavin2u Linux - Server 10 11-13-2008 11:07 PM
mysql failed to start nawuza Linux - Newbie 4 07-23-2008 12:13 PM
Failed to start MySQL satimis Linux - Server 2 12-21-2006 06:41 AM
mysql start....FAILED GreenAcres Linux - Newbie 7 08-25-2006 11:58 PM > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 03:16 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration