MySQL Forums
Forum List  »  PHP

Lost connection to MySQL server during query
Posted by: neil craig
Date: June 05, 2006 03:36AM

Hi everyone

i've been developing a pretty large website using php5 which recently went live. i've found a problem in the site which has stumped me...i confess i don't know an awful lot about setting up the mysql conf, all i have ever done to the standard mysql setup is to secure the access to it.

the problem i have is that on one page (and one page only) of the site, the connection to the database drops and i get the following output from mysql:

Lost connection to MySQL server during query

the next query then give me an error saying:

Can't connect to local MySQL server through socket '/var/run/mysql/mysqld.sock' (111)

i've double checked and triple checked and the socket is fine, mysql has access to it. the rest of the site works absolutely fine using the same connection.

the query which causes the lost connection is valid and works in the mysql administrator and the CLI:

select distinct chatroom.chatroom_label as label, chatroom.chatroom_id as id
from chatroom inner join chatroom_allowed_user using(chatroom_id)
where chatroom.chatroom_date_deleted_timestamp is null
and chatroom.chatroom_is_permanent_chatroom!="1"
and (chatroom_allowed_user.user_id="1" or chatroom.user_id="1")
order by chatroom_label asc

if anyone has any ideas on what could be wrong i'd be amazingly grateful as i'm completely at a loss to explain it...

many thanks in advance if anyone can help

Options: ReplyQuote

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.