Mysql won't start

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?

6 Replies

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">http://library.linode.com/troubleshooting/upgrade-to-debian-6-squeeze#sph_system-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.

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?

Check /var/log/syslog just after running start mysql and /var/log/mysql/error.log

Also check your /var/log/mysql permissions they should be

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

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?

You have no disk space

> ````

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

````

This is great, I had the same problem and that fixed it!

Thank you very much!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct