LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-25-2014, 07:34 PM   #1
czezz
Member
 
Registered: Nov 2004
Distribution: Slackware/Solaris
Posts: 931

Rep: Reputation: 44
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 ?

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

Original Poster
Rep: Reputation: 44
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
 
Old 03-12-2018, 06:07 AM   #3
yustto
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.
 
  


Reply



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 02:54 PM
mysql failed to start. reinstall failed either!!! gavin2u Linux - Server 10 11-13-2008 10:07 PM
mysql failed to start nawuza Linux - Newbie 4 07-23-2008 11:13 AM
Failed to start MySQL satimis Linux - Server 2 12-21-2006 05:41 AM
mysql start....FAILED GreenAcres Linux - Newbie 7 08-25-2006 10:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:09 PM.

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