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 - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-08-2012, 02:12 PM   #1
kalashari
LQ Newbie
 
Registered: Feb 2012
Posts: 12

Rep: Reputation: Disabled
Mysql server stops randomly


Hi all,

I have VPS with Mysql and Apache on it. I find it recently that Mysql just stops out of the blue for no reason. Then I restarted mysql server and everything works fine.

Does anyone have an idea why this is happening?

I think the problematic line from mysql.log is this:

Code:
120408 18:23:26 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
Here's the content of the whole mysql.log file:

Code:
120408 09:49:06 mysqld_safe Number of processes running now: 0
120408 09:49:06 mysqld_safe mysqld restarted
120408  9:49:28 [Note] Plugin 'FEDERATED' is disabled.
120408  9:49:28 [Note] Plugin 'InnoDB' is disabled.
120408  9:49:30 [Note] Event Scheduler: Loaded 0 events
120408  9:49:30 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 10:43:01 mysqld_safe Number of processes running now: 0
120408 10:43:06 mysqld_safe mysqld restarted
120408 10:44:56 [Note] Plugin 'FEDERATED' is disabled.
120408 10:44:56 [Note] Plugin 'InnoDB' is disabled.
120408 10:45:11 [Note] Event Scheduler: Loaded 0 events
120408 10:45:12 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 11:28:24 mysqld_safe Number of processes running now: 0
120408 11:28:46 mysqld_safe mysqld restarted
120408 11:31:50 [Note] Plugin 'FEDERATED' is disabled.
120408 11:31:50 [Note] Plugin 'InnoDB' is disabled.
120408 11:31:52 [Note] Event Scheduler: Loaded 0 events
120408 11:31:52 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 12:12:19 mysqld_safe Number of processes running now: 0
120408 12:12:43 mysqld_safe mysqld restarted
120408 12:32:20 [Note] Plugin 'FEDERATED' is disabled.
120408 12:32:22 [Note] Plugin 'InnoDB' is disabled.
120408 12:33:33 [Note] Event Scheduler: Loaded 0 events
120408 12:33:33 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 12:47:51 mysqld_safe Number of processes running now: 0
120408 12:48:02 mysqld_safe mysqld restarted
120408 12:58:36 [Note] Plugin 'FEDERATED' is disabled.
120408 12:58:36 [Note] Plugin 'InnoDB' is disabled.
120408 12:58:41 [Note] Event Scheduler: Loaded 0 events
120408 12:58:41 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 13:20:35 mysqld_safe Number of processes running now: 0
120408 13:20:36 mysqld_safe mysqld restarted
120408 13:21:08 [Note] Plugin 'FEDERATED' is disabled.
120408 13:21:08 [Note] Plugin 'InnoDB' is disabled.
120408 13:21:55 [Note] Event Scheduler: Loaded 0 events
120408 13:21:55 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 13:40:29 mysqld_safe Number of processes running now: 0
120408 13:40:32 mysqld_safe mysqld restarted
120408 13:41:08 [Note] Plugin 'FEDERATED' is disabled.
120408 13:41:08 [Note] Plugin 'InnoDB' is disabled.
120408 13:41:15 [Note] Event Scheduler: Loaded 0 events
120408 13:41:15 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 13:47:06 mysqld_safe Number of processes running now: 0
120408 13:47:07 mysqld_safe mysqld restarted
120408 13:47:28 [Note] Plugin 'FEDERATED' is disabled.
120408 13:47:28 [Note] Plugin 'InnoDB' is disabled.
120408 13:47:33 [Note] Event Scheduler: Loaded 0 events
120408 13:47:33 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 14:03:47 mysqld_safe Number of processes running now: 0
120408 14:04:18 mysqld_safe mysqld restarted
120408 14:11:17 [Note] Plugin 'FEDERATED' is disabled.
120408 14:11:17 [Note] Plugin 'InnoDB' is disabled.
120408 14:11:38 [Note] Event Scheduler: Loaded 0 events
120408 14:11:40 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 14:29:11 mysqld_safe Number of processes running now: 0
120408 14:29:24 mysqld_safe mysqld restarted
120408 14:31:58 [Note] Plugin 'FEDERATED' is disabled.
120408 14:32:01 [Note] Plugin 'InnoDB' is disabled.
120408 14:38:44 [Note] Event Scheduler: Loaded 0 events
120408 14:38:44 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 15:18:37 mysqld_safe Number of processes running now: 0
120408 15:18:41 mysqld_safe mysqld restarted
120408 15:22:37 [Note] Plugin 'FEDERATED' is disabled.
120408 15:22:38 [Note] Plugin 'InnoDB' is disabled.
120408 15:23:57 [Note] Event Scheduler: Loaded 0 events
120408 15:23:57 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 15:40:47 mysqld_safe Number of processes running now: 0
120408 15:40:56 mysqld_safe mysqld restarted
120408 15:48:31 [Note] Plugin 'FEDERATED' is disabled.
120408 15:48:31 [Note] Plugin 'InnoDB' is disabled.
120408 15:50:26 [Note] Event Scheduler: Loaded 0 events
120408 15:50:27 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 17:24:11 mysqld_safe Number of processes running now: 0
120408 17:24:22 mysqld_safe mysqld restarted
120408 17:25:23 [Note] Plugin 'FEDERATED' is disabled.
120408 17:25:24 [Note] Plugin 'InnoDB' is disabled.
120408 17:25:31 [Note] Event Scheduler: Loaded 0 events
120408 17:25:32 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 17:40:03 mysqld_safe Number of processes running now: 0
120408 17:40:06 mysqld_safe mysqld restarted
120408 17:41:18 [Note] Plugin 'FEDERATED' is disabled.
120408 17:42:19 [Note] Plugin 'InnoDB' is disabled.
120408 17:46:12 [Note] Event Scheduler: Loaded 0 events
120408 17:46:12 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
Killed
120408 18:09:42 mysqld_safe Number of processes running now: 0
120408 18:09:52 mysqld_safe mysqld restarted
120408 18:15:57 [Note] Plugin 'FEDERATED' is disabled.
120408 18:16:02 [Note] Plugin 'InnoDB' is disabled.
Killed
120408 18:23:26 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
120408 20:32:16 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
120408 20:32:16 [Note] Plugin 'FEDERATED' is disabled.
120408 20:32:16 [Note] Plugin 'InnoDB' is disabled.
120408 20:32:17 [Note] Event Scheduler: Loaded 0 events
120408 20:32:17 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.1.49-3'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  (Debian)
 
Old 04-08-2012, 06:16 PM   #2
xonogenic
Member
 
Registered: Feb 2006
Posts: 30

Rep: Reputation: 2
At first glance, it looks like mysql is being killed, that is, it isn't dying due to a permission problem or a corrupted table somewhere. That is good news in that it narrows it down somewhat.

Can you grep through your messages log and daemon log for mysql and see if you can find any other messages that might point towards how it is being killed? If this doesn't work, you can set some more verbose logging for mysql in your my.cnf file.

Let me know the output of the greps above and I will find how to turn on heavier debugging in mysql.
 
1 members found this post helpful.
Old 04-08-2012, 06:22 PM   #3
xonogenic
Member
 
Registered: Feb 2006
Posts: 30

Rep: Reputation: 2
A quick google found this page

http://serverfault.com/questions/710...-mysql-logging

The last comment suggests adding this to your my.cnf file.
Quote:

log-bin=/var/log/mysql-bin.log
log=/var/log/mysql.log
log-error=/var/log/mysql-error.log
log-slow-queries=/var/log/mysql-slowquery.log
I would suggest just adding the log and log-error along with the appropriate pathnames and see what shows up.

Last edited by xonogenic; 04-08-2012 at 06:23 PM.
 
1 members found this post helpful.
Old 04-09-2012, 04:14 AM   #4
kalashari
LQ Newbie
 
Registered: Feb 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by xonogenic View Post
At first glance, it looks like mysql is being killed, that is, it isn't dying due to a permission problem or a corrupted table somewhere. That is good news in that it narrows it down somewhat.

Can you grep through your messages log and daemon log for mysql and see if you can find any other messages that might point towards how it is being killed? If this doesn't work, you can set some more verbose logging for mysql in your my.cnf file.

Let me know the output of the greps above and I will find how to turn on heavier debugging in mysql.
Hi,

What grep command exactly should I run? I am not an expert, obviously

Thanks for answer.
 
Old 04-09-2012, 11:45 AM   #5
kalashari
LQ Newbie
 
Registered: Feb 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
OK I just saw that my abovementioned mysql.log was actually an error log.

Regular mysql logging has been turned off due to a lot of space that the file was taking up.
 
Old 04-12-2012, 04:02 AM   #6
kalashari
LQ Newbie
 
Registered: Feb 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Anyone?
 
  


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
Network randomly stops working Doug52392 Linux - Networking 1 11-06-2007 03:29 AM
LILO randomly stops working davidguygc Linux - Hardware 1 04-15-2007 10:21 PM
mysql server starts then stops during boot rcschroeder Slackware - Installation 5 01-12-2007 08:37 AM
YDL installation stops randomly MACSRULE Linux - General 1 09-27-2006 02:55 PM
xmms randomly stops playing kryptobs2000 Linux - Software 0 07-26-2004 07:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:56 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