How to tell if any MySQL connections has been dropped or timed out?
Posted
by
Continuation
on Server Fault
See other posts from Server Fault
or by Continuation
Published on 2011-02-27T02:00:20Z
Indexed on
2011/02/27
15:26 UTC
Read the original article
Hit count: 221
A client is using PHP to connect to MySQL. The PHP scripts and the MySQL database are located on 2 different Linux servers. He complained that database connections were being dropped or timed out and asked me to take a look.
Is there any place in MySQL that can show me what and how many connections have been dropped or timed out? I looked into slow query log and didn't see anything.
Any suggestions on how to diagnose this dropped/timed out database connection problem?
Thanks
EDIT:
Slow query log is enabled in my.cnf
:
log-slow-queries=/var/log/mysql-slow-queries.log
And when I do a
mysql> show global status;
I got:
| Slow_queries | 11402347 |
So there are a lot of slow queries. But the file /var/log/mysql-slow-queries.log doesn't exist. Why is that?
© Server Fault or respective owner