Auto-Restart My SQL when 2 many connect-errors

From: Solange Ezveff (se_at_friend.fr)
Date: 12/23/04


Date: 23 Dec 2004 00:25:47 -0800

Hi,

>From the advises received, I built the following script to restart
mysql when the database is blocked because of "Too many connection
errors" : The max_connection_errors in MySQL admin is set quite high.
Therefore we do not know where this error comes from.

With this script :
#!/bin/sh
  ps -ef | grep mysql | grep mysqld | grep -v grep > mysqlstatus
         if [ -s mysqlstatus ]; then
           echo "MySQL: OK"
           else
             echo "MySQL: NO"
             /etc/rc.d/init.d/mysqld restart
             fi
        rm mysqlstatus

We restart MySQL when it is down. We need to add it in order to
have MySQL restarted when "Too many connection errors" occurs. We do not know
if a test connection to the database to be the answer. Please (double
please) : might you add two or three lines in order to restart MySQL
when we have "Too many connection errors". I thank you very much in
advance.

Solange.



Relevant Pages

  • Re: hitting the limits
    ... relatively straight forward MySql database. ... 10K visitors a month and an 80Mb database are nothing. ... heavily loaded server. ... But the connection will hang around until the garbage ...
    (comp.lang.php)
  • Re: VFP8 & MySQL
    ... > VFP functions like NVL to a MySQL one, definitely it made the switch very ... > About your connection problem, I have mine setup as default for 100 ... As for the server, we left it ... The server crashed and corrupted the database. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: VFP8 & MySQL
    ... Main Location and 3 branches (these are remotely accessing MySQL at the main ... About your connection problem, I have mine setup as default for 100 ... As for the server, we left it alone. ... The server crashed and corrupted the database. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: Java and MySql program example ?
    ... > I am trying to learn Java and need an example program with MySql ... > MySql database. ... Database connection established ...
    (comp.lang.java.programmer)
  • Re: OdbcDataReader
    ... I did as you told and i find out that the connection to the MySql ... database closes and if i go to the MySql mamager i not able to open it ... >> While the odbccommand is reading the Access table I open the other ...
    (microsoft.public.dotnet.languages.csharp)