LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-03-2012, 09:25 PM   #31
southpointingchariot
Member
 
Registered: Sep 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by sag47 View Post
Also, forgot to mention but might want to try,
Code:
chown -R mysql\: /var/lib/mysql
No luck. Running "chown -R mysql\: /var/lib/mysql" returns nothing, and running "sudo service mysql start" afterwards returned "start: Job failed to start". Time for the nuclear option...
 
Old 09-03-2012, 09:28 PM   #32
southpointingchariot
Member
 
Registered: Sep 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sag47 View Post
The only thing I can think of left is maybe removing the /var/lib/mysql directory entirely.
Code:
#double check the path!  And double check it's not important!
sudo rm -rf /var/lib/mysql
Then try to start the mysql server again. Not unless you can give us more log information from dmesg or other mysql related log files.
The directory has been totally removed (I checked var/lib). I still get "start: Job failed to start". Should I run "sudo apt-get install mysql" again?
 
Old 09-03-2012, 09:30 PM   #33
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,848
Blog Entries: 36

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Wait before you do. I think I found some log files for us to investigate.
Code:
root@farcry:/var/log# cd /var/log/
root@farcry:/var/log# grep -ri mysql * | cut -d: -f1 | sort -u
dmesg
dmesg.0
dpkg.log.1
kern.log
syslog
upstart/mysql.log
Investigate /var/log/upstart/mysql.log. What does it say at the bottom?

Alternatively you could show me the log by doing the following,
Code:
sudo apt-get install pastebinit
pastebinit /var/log/upstart/mysql.log
 
Old 09-03-2012, 09:32 PM   #34
southpointingchariot
Member
 
Registered: Sep 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sag47 View Post
Wait before you do. I think I found some log files for us to investigate.
Code:
root@farcry:/var/log# cd /var/log/
root@farcry:/var/log# grep -ri mysql * | cut -d: -f1 | sort -u
dmesg
dmesg.0
dpkg.log.1
kern.log
syslog
upstart/mysql.log
Investigate /var/log/upstart/mysql.log. What does it say at the bottom?

Alternatively you could show me the log by doing the following,
Code:
sudo apt-get install pastebinit
pastebinit /var/log/upstart/mysql.log
Have at it! http://paste.ubuntu.com/1184884/
 
Old 09-03-2012, 09:38 PM   #35
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,848
Blog Entries: 36

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Do you have a /etc/my.cnf file? By default there is none but I'm wondering if you created it as part of some tutorial. If so then pastebinit.
 
Old 09-03-2012, 09:41 PM   #36
southpointingchariot
Member
 
Registered: Sep 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sag47 View Post
Do you have a /etc/my.cnf file? By default there is none but I'm wondering if you created it as part of some tutorial. If so then pastebinit.
I don't have that, but I do have a /etc/mysql/my.cnf file. http://paste.ubuntu.com/1184895/
 
Old 09-03-2012, 09:43 PM   #37
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,848
Blog Entries: 36

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Run this command, what happens?
Code:
ls /var/run/mysqld/mysqld.sock
 
Old 09-03-2012, 09:44 PM   #38
southpointingchariot
Member
 
Registered: Sep 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sag47 View Post
Run this command, what happens?
Code:
ls /var/run/mysqld/mysqld.sock
ls: cannot access /var/run/mysqld/mysqld.sock: No such file or directory

/var/run/mysqld is empty.

Last edited by southpointingchariot; 09-03-2012 at 09:45 PM.
 
Old 09-03-2012, 09:49 PM   #39
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,848
Blog Entries: 36

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Okay so mysql service is definitely not running.

Can you pastebinit all of the log files you find within /var/log/? Here's a giant one liner to do it.
Code:
grep -ri mysql /var/log/* | cut -d: -f1 | sort -u | while read filename;do pastebinit $filename;done
SAM
 
Old 09-03-2012, 09:56 PM   #40
southpointingchariot
Member
 
Registered: Sep 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sag47 View Post
Okay so mysql service is definitely not running.

Can you pastebinit all of the log files you find within /var/log/? Here's a giant one liner to do it.
Code:
grep -ri mysql /var/log/* | cut -d: -f1 | sort -u | while read filename;do pastebinit $filename;done
SAM
Just how I like 'em:

http://paste.ubuntu.com/1184925/
http://paste.ubuntu.com/1184926/
http://paste.ubuntu.com/1184927/
http://paste.ubuntu.com/1184928/
http://paste.ubuntu.com/1184929/
http://paste.ubuntu.com/1184930/
http://paste.ubuntu.com/1184933/
http://paste.ubuntu.com/1184935/
http://paste.ubuntu.com/1184940/
http://paste.ubuntu.com/1184941/
http://paste.ubuntu.com/1184942/
http://paste.ubuntu.com/1184944/
http://paste.ubuntu.com/1184945/
 
Old 09-03-2012, 09:57 PM   #41
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,848
Blog Entries: 36

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Even better, can you associate names with them. Here's another one liner but this time it lets me know which log is which. In the mean time I'll search through what you provided.
Code:
grep -ri mysql /var/log/* | cut -d: -f1 | sort -u | while read filename;do echo -n "${filename}: "; pastebinit $filename;done
 
Old 09-03-2012, 10:03 PM   #42
southpointingchariot
Member
 
Registered: Sep 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sag47 View Post
Even better, can you associate names with them. Here's another one liner but this time it lets me know which log is which. In the mean time I'll search through what you provided.
Code:
grep -ri mysql /var/log/* | cut -d: -f1 | sort -u | while read filename;do echo -n "${filename}: "; pastebinit $filename;done
Lol, that would be more useful wouldn't it:

/var/log/apt/history.log: http://paste.ubuntu.com/1184961/
/var/log/apt/term.log: http://paste.ubuntu.com/1184962/
/var/log/auth.log: http://paste.ubuntu.com/1184963/
/var/log/dbconfig-common/dbc.log: http://paste.ubuntu.com/1184964/
/var/log/dmesg: http://paste.ubuntu.com/1184965/
/var/log/dpkg.log: http://paste.ubuntu.com/1184966/
/var/log/dpkg.log.1: http://paste.ubuntu.com/1184968/
/var/log/kern.log: http://paste.ubuntu.com/1184969/
/var/log/kern.log.1: http://paste.ubuntu.com/1184971/
/var/log/syslog: http://paste.ubuntu.com/1184972/
/var/log/syslog.1: http://paste.ubuntu.com/1184975/
/var/log/upstart/mysql.log: http://paste.ubuntu.com/1184976/
/var/log/upstart/ureadahead.log: http://paste.ubuntu.com/1184977/
 
Old 09-03-2012, 10:05 PM   #43
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,848
Blog Entries: 36

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
I think I found something in this log file: http://paste.ubuntu.com/1184935/ this is likely your kern.log

I google searched for "mysql respawning too fast, stopped" and found an article.
http://askubuntu.com/questions/12726...o-fast-stopped

It's not clear that is your problem as I didn't find those values specified within your previously pasted /etc/mysql/my.cnf. It may also be something specified in /etc/mysql/conf.d/. I'll keep looking to see if I can find something.

Do you have files within /etc/mysql/conf.d/?
 
Old 09-03-2012, 10:07 PM   #44
southpointingchariot
Member
 
Registered: Sep 2012
Posts: 31

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by sag47 View Post
I think I found something in this log file: http://paste.ubuntu.com/1184935/ this is likely your kern.log

I google searched for "mysql respawning too fast, stopped" and found an article.
http://askubuntu.com/questions/12726...o-fast-stopped

It's not clear that is your problem as I didn't find those values specified within your previously pasted /etc/mysql/my.cnf. It may also be something specified in /etc/mysql/conf.d/. I'll keep looking to see if I can find something.

Do you have files within /etc/mysql/conf.d/?
I have a "mysqld_safe_syslog.cnf": http://paste.ubuntu.com/1184981/
 
Old 09-03-2012, 10:16 PM   #45
sag47
Senior Member
 
Registered: Sep 2009
Location: Orange County, CA
Distribution: Kubuntu x64, Raspbian, CentOS
Posts: 1,848
Blog Entries: 36

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
With all the logs I look at it appears the root of the problem is with apparmor terminating it with "mysql respawning too fast" errors. I think we should tackle the problem from that angle.

Try some of the solutions outlined in this article, except everywhere you see "/media/asimov/mysql" just do "/var/lib/mysql" in your case.
http://languor.us/mysql-respawning-t...nated-status-1

It's late in my timezone so I'm going to go to bed. But I'll be up again tomorrow and continue looking into this.

SAM
 
  


Reply


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
LXer: How To Install LAMP Server in Ubuntu Server 12.04 LTS LXer Syndicated Linux News 0 05-20-2012 12:45 AM
Centos LAMP Server with unidentified script causing server to port scan ZS- Linux - Security 48 01-30-2011 07:27 AM


All times are GMT -5. The time now is 12:32 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration