MySQL keeps stopping!

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Locked
zoomiest
Posts: 1
Joined: 2011/12/07 04:21:51
Contact:

MySQL keeps stopping!

Post by zoomiest » 2011/12/07 04:40:52

I am running Centos 5.6 on a VPS, with MySQL 5.0.77, and while on this new VPS host, the MySQL just stops out of now where. It actually looks like it shuts down normally.

I look at the security logs, and it looks like there is constant attacks, but I can't tell if anyone is getting in.

The MySQL log looks like this
110905 21:49:16 [Note] /usr/libexec/mysqld: Shutdown complete

110905 21:49:16 mysqld ended

110905 21:49:16 mysqld started
110905 21:49:16 InnoDB: Started; log sequence number 0 43655
110905 21:49:16 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
110905 23:54:56 [Note] /usr/libexec/mysqld: Normal shutdown

110905 23:54:56 InnoDB: Starting shutdown...
110905 23:54:56 InnoDB: Shutdown completed; log sequence number 0 43655
110905 23:54:56 [Note] /usr/libexec/mysqld: Shutdown complete

110905 23:54:56 mysqld ended

110905 23:54:57 mysqld started
110905 23:54:57 InnoDB: Started; log sequence number 0 43655
110905 23:54:57 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
110905 23:57:56 [Note] /usr/libexec/mysqld: Normal shutdown

110905 23:57:56 InnoDB: Starting shutdown...
110905 23:57:57 InnoDB: Shutdown completed; log sequence number 0 43655
110905 23:57:57 [Note] /usr/libexec/mysqld: Shutdown complete

110905 23:57:57 mysqld ended

110905 23:57:58 mysqld started
110905 23:57:59 InnoDB: Started; log sequence number 0 43655
110905 23:57:59 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
110906 0:18:15 [Note] /usr/libexec/mysqld: Normal shutdown

110906 0:18:15 InnoDB: Starting shutdown...
110906 0:18:16 InnoDB: Shutdown completed; log sequence number 0 43655
110906 0:18:16 [Note] /usr/libexec/mysqld: Shutdown complete

110906 00:18:16 mysqld ended

110906 00:18:17 mysqld started
110906 0:18:17 InnoDB: Started; log sequence number 0 43655
110906 0:18:17 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
110906 0:34:25 [Note] /usr/libexec/mysqld: Normal shutdown

110906 0:34:25 InnoDB: Starting shutdown...
110906 0:34:26 InnoDB: Shutdown completed; log sequence number 0 43655
110906 0:34:26 [Note] /usr/libexec/mysqld: Shutdown complete

110906 00:34:26 mysqld ended

110906 00:34:27 mysqld started
110906 0:34:27 InnoDB: Started; log sequence number 0 43655
110906 0:34:27 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
110906 0:41:26 [Note] /usr/libexec/mysqld: Normal shutdown

110906 0:41:26 InnoDB: Starting shutdown...
110906 0:41:27 InnoDB: Shutdown completed; log sequence number 0 43655
110906 0:41:27 [Note] /usr/libexec/mysqld: Shutdown complete

110906 00:41:27 mysqld ended

110906 00:41:28 mysqld started
110906 0:41:28 InnoDB: Started; log sequence number 0 43655
110906 0:41:28 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
111016 02:14:37 mysqld started
111016 2:14:37 InnoDB: Started; log sequence number 0 43655
111016 2:14:37 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
111121 15:52:19 mysqld started
111121 15:52:19 InnoDB: Started; log sequence number 0 43655
111121 15:52:19 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
111130 02:07:48 mysqld started
111130 2:07:49 InnoDB: Started; log sequence number 0 43655
111130 2:07:49 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
111203 04:16:50 mysqld started
111203 4:16:51 InnoDB: Started; log sequence number 0 43655
111203 4:16:51 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
111206 14:41:31 mysqld started
111206 14:41:31 InnoDB: Started; log sequence number 0 43655
111206 14:41:31 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution
111207 07:06:38 mysqld started
111207 7:06:39 InnoDB: Started; log sequence number 0 43655
111207 7:06:39 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.0.77' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution


Do you have any hints for me? I am at a loss as to what to look for. Why would I get the normal shutdown all the time?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: MySQL keeps stopping!

Post by pschaff » 2011/12/10 00:03:29

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

Please [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=28723&forum=54]provide more information about your system[/url] by running "./getinfo.sh" and showing us the output file, along with the results of
[code]rpm -qa mysql\*[/code]

kbensch
Posts: 50
Joined: 2005/04/22 17:27:42
Location: Maidenhead, UK
Contact:

MySQL keeps stopping!

Post by kbensch » 2011/12/29 20:30:30

Hi

How much disk space have you got?

exNewbie
Posts: 1
Joined: 2012/03/05 23:54:56

Re: MySQL keeps stopping!

Post by exNewbie » 2012/03/06 00:16:17

I got the same issue. I found out there are 2 MySQL architectures running on this server and I removed the 32 bit one.

rpm -e mysql-5.0.95-1.el5_7.1.i386

It's working well currently. Hope this would help.


Server configuration:
* CentOS 5.7 64 bit
* MySQL 5.0.95

girik1205
Posts: 1
Joined: 2015/03/18 05:53:23

Re: MySQL keeps stopping!

Post by girik1205 » 2015/03/18 06:01:48

Hi,

You said that you are running to instances of MYSQL versions in your server.

If you are getting the same problem even maintaining the single version of MYSQL in your server. Follow the below.

It might be also the problem with the connections that are receiving by the mysql.



Procedure : 1 (Without restarting the mysqld service)

To find out how many max_connections are allowed currently on your mysql server use following command from mysql prompt.

mysql> select @@max_connections;
+-------------------+
| @@max_connections |
+-------------------+
| 100 |
+-------------------+
1 row in set (0.00 sec)

max_connections is a GLOBAL variable. we can increase it on the fly without restarting mysqld service.
To do so use following command.

mysql> set global max_connections = 200;
Query OK, 0 rows affected (0.00 sec)

Now, If you check again you will see that limit of max_connections is increased.

mysql> select @@max_connections;
+-------------------+
| @@max_connections |
+-------------------+
| 200 |
+-------------------+
1 row in set (0.00 sec)



Procedure : 2 (restart the mysqld service)


It was the /etc/my.cnf file. I added this line under [mysqld]:

max_connections=100 (Extend as per your requirement. Max limit 10000 connections if the server configuration is high)

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: MySQL keeps stopping!

Post by TrevorH » 2015/03/18 09:08:19

Please don't resurrect ancient threads!

It is highly unlikely that exceeding max_connections would cause mysql to stop running. If you exceed max_connections you get an error message when you try to connect telling you that it failed due to too many connections. You don't get connection refused.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Locked