Mysql Hung

judab2

Verified User
Joined
Feb 14, 2006
Messages
24
Hi everyone

My server is running with FC5 and DirectAdmin
using the following daemon verions

Apache 1.3.37 Running
DirectAdmin 1.29.4 Running
MySQL 4.1.12 Running


i have few websites based on Joomla on my server,

for unknown reason my mySQL daemon is hung when it happend
all the joomla based websites are down since there is no connection to the mySQL,

i have tried to telnet localhost 3306 when it happend and the connection is open
but without the mySQL prompt at the begining of the connection.

when i am trying to kill the mysqld it doesnt help i have to kill the mysqld_safe
and then the mysqld




today i have added log to the quries so i will be able to see the last query
that have been executed before the crash



if someone have few ideas why it is happend i will be very greatful .
or additional workarounds
 
MySQL 4.1.12 is rather outdated. You may want to look into upgrading to the latest version (5.0.45 as of right now).
 
Hi everyone
today i have added log to the quries so i will be able to see the last query
that have been executed before the crash

Seems i'm having exact the same problem.
since i'm complete new to this whole sysadmin thing, would you like to explain to me how you enabled mysql logging?

thanks, have a great day!
Johan.
 
I had the same problem and found a script that check/ restart mysql based on cron.

As stated in the description: make the file /root/scripts/mysqlcheck.sh
Give the file chmod 700
Make an crontab entry to run the script, for example each 5. minute:
*/5 * * * * root /scripts/mysqlcheck.sh

#!/bin/sh

# Auteur : Dillard Blom ([email protected])
# Doel : Checkup op MySQL en herstarten indien nodig
#
# Gebruik : Pas dit script aan voor eigen gebruik en plaats in /etc/crontab
#
# Commando: /root/scripts/mysqlcheck (chmod 700)
#
# Gemaakt : 11-04-2005
#
#

/usr/bin/mysqladmin ping

if [ $? -eq 0 ] ; then
# echo "MySQL werkt nog steeds"
exit 0
else
echo "MySQL is restarted" | mail [email protected]
/usr/bin/killall mysqld
service mysqld start

# checkup again
sleep 30
exec $0
fi

exit 0;
 
Back
Top