Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Mysql won't start
PostPosted: Mon Jul 11, 2011 11:08 am 
Offline
Senior Newbie

Joined: Sat Mar 19, 2011 9:57 pm
Posts: 17
Hello.

I have a rails app running on Mysql. However currently my site is down (koop.hk) because the mysql server can't be restarted.

When I try to run:

root@plato:~# /etc/init.d/mysql start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start mysql
start: Job failed to start

I get the message that it failed to start.

What can I do to get it back online?


Top
   
 Post subject:
PostPosted: Mon Jul 11, 2011 11:25 am 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
Did you just upgrade Debian or something? If so, I believe you'll need to uninstall MySQL and reinstall it. At least that's what I had to do.

See this:
http://library.linode.com/troubleshooti ... tem-errors

There are some other comments about MySQL in the comments of that post as well.

If this isn't right after an upgrade to the system, then check MySQL's logs.


Top
   
 Post subject:
PostPosted: Mon Jul 11, 2011 11:29 am 
Offline
Senior Newbie

Joined: Sat Mar 19, 2011 9:57 pm
Posts: 17
Hi thanks for your reply.

Strangely enough my mysql error logs in /var/log/mysql/ are all empty. However, when I try to access mysql by typing "mysql" I get the following

root@plato:/var/log/mysql# mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)

Any ideas?


Top
   
 Post subject:
PostPosted: Mon Jul 11, 2011 11:39 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Check /var/log/syslog just after running
Code:
start mysql
and /var/log/mysql/error.log

Also check your /var/log/mysql permissions they should be
Code:
ls -lha /var/log/mysql
total 44K
drwxr-s---  2 mysql adm  4.0K 2011-07-11 06:31 .
drwxr-xr-x 12 root  root 4.0K 2011-07-11 06:31 ..
-rw-rw----  1 mysql adm   638 2011-07-11 11:37 error.log
-rw-r-----  1 mysql adm   356 2011-07-11 11:37 mysql-slow.log

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Mon Jul 11, 2011 11:44 am 
Offline
Senior Newbie

Joined: Sat Mar 19, 2011 9:57 pm
Posts: 17
the syslog gives

Jul 11 23:40:52 plato init: mysql pre-start process (29459) terminated with status 1

The /var/log/mysql/error.log is empty!

The permissions are:

0 -rw-rw---- 1 mysql adm 0 Jul 11 22:54 error.log


I did check the free disk space on my linode just now with

root@plato:/var/log/mysql# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda 19G 19G 0 100% /
devtmpfs 363M 180K 363M 1% /dev
none 363M 0 363M 0% /dev/shm
none 363M 56K 363M 1% /var/run
none 363M 0 363M 0% /var/lock
none 363M 0 363M 0% /lib/init/rw

You think this is causing it?


Top
   
 Post subject:
PostPosted: Mon Jul 11, 2011 11:50 am 
Offline
Senior Member

Joined: Thu May 21, 2009 3:19 am
Posts: 336
You have no disk space

Quote:
Code:
Filesystem Size Used Avail Use% Mounted on 
/dev/xvda  19G  19G  0     100% /


Top
   
 Post subject: Re: Mysql won't start
PostPosted: Fri Jun 22, 2012 11:18 am 
Offline

Joined: Fri Jun 22, 2012 11:16 am
Posts: 1
This is great, I had the same problem and that fixed it!

Thank you very much!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group