Lost connection to MySQL server during query

From: Date: Thu, 11 Jan 2001 16:34:08 +0000
Subject: Lost connection to MySQL server during query
Groups: php.general 
Request: Send a blank email to php-general+get-34035@lists.php.net to get a copy of this message
Can anyone help with this. Got Apache 1.3.14, PHP 4.0.3pl1 and MySQL 3.22.32 happily installed. All seems to work fine, yet I keep getting these error messages when doing queries through PHP scripts (seems to work okay doing the same queries from the mysql prompt though). I tried the phpMyAdmin and bookmarker applications from the php projects page and although both work fine they have the exact same problem, you can always get the queries to go through eventually if you keep reloading the relevant php page until it loads without error - so there is nothing syntactically wrong with the query or with php/mysql being able to handle it. No large amounts of data are being handled and response times are in seconds (or less). Theres an example output of the error when it fails on bookmarker (reload the page a few times and there are usually different errors but eventually it will work correctly without any errors) at the end of this message. I looked at FAQ and mail archives from a number of sources and found a number of other people that have an identical error to this, but there is never any answer to the question (there are some suggestions that a common thread is running on Solaris 2.6 which I am and that it might be to do with error lookup). It seems there is a very fundamental problem with MySQL here which means it is useless on this platform - does anyone have it working on 2.6? Any help appreciated - otherwise I have to go look at postgresql :( Cheers, Tim. Some sample error messages - note that although it appears to be complaining about the SQL in some of these - the SQL actually runs fine under mysql and if you reload the same page repeatedly it eventually works without error. These are from bookmarker, but the problem is the same for phpmyadmin so its not the applications themselves: Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: Invalid SQL: select val from active_sessions where sid = '84aedf088024b988ff849922ea8c4b31' and name = 'bk_sess' Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: next_record called with no query pending. Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: cannot use database timctest Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: next_record called with no query pending. Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: Invalid SQL: update active_sessions set val='Ymtfc2VzczokdGhpcy0+aW4gPSAnMSc7ICR0aGlzLT5wdCA9IGFycmF5KCk7ICR0aGlzLT5wdFsnYXV0aCddID0gJzEnOyAkdGhpcy0+cHRbJ3Nlc3NfbXNnJ10gPSAnMSc7ICR0aGlzLT5wdFsnc2Vzc193YXJuX21zZyddID0gJzEnOyAkdGhpcy0+cHRbJ3Nlc3NfZXJyb3JfbXNnJ10gPSAnMSc7ICRHTE9CQUxTWydhdXRoJ10gPSBuZXcgYmtfY3JfYXV0aDsgJEdMT0JBTFNbJ2F1dGgnXS0+YXV0aCA9IGFycmF5KCk7ICRHTE9CQUxTWydhdXRoJ10tPmF1dGhbJ3VpZCddID0gJ25vYm9keSc7ICRHTE9CQUxTWydhdXRoJ10tPmF1dGhbJ3Blcm0nXSA9ICcnOyAkR0xPQkFMU1snYXV0aCddLT5hdXRoWydleHAnXSA9ICcyMTQ3NDgzNjQ3JzsgJEdMT0JBTFNbJ2F1dGgnXS0+YXV0aFsncmVmcmVzaCddID0gJzIxNDc0ODM2NDcnOyAkR0xPQkFMU1snc2Vzc19tc2cnXSA9ICcnOyAkR0xPQkFMU1snc2Vzc193YXJuX21zZyddID0gJyc7ICRHTE9CQUxTWydzZXNzX2Vycm9yX21zZyddID0gJyc7IA==', changed='20010111162415' where sid='84aedf088024b988ff849922ea8c4b31' and name='bk_sess' Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: Invalid SQL: select sum(total_public_bookmarks) as total_public from auth_user where username != '' Database Error DB Err Number: 2013 DB Err Message: Lost connection to MySQL server during query Application Message: Invalid SQL: select category.name as category_name, bookmark.category_id, subcategory.name as subcategory_name, bookmark.subcategory_id, bookmark.id, bookmark.url, bookmark.name as bookmark_name, bookmark.ldesc, bookmark.keywords, rating.name as rating_name, bookmark.rating_id, bookmark.username from bookmark, category, subcategory, rating where ( bookmark.category_id = category.id and category.username = bookmark.username and bookmark.subcategory_id = subcategory.id and subcategory.username = bookmark.username and bookmark.rating_id = rating.id and rating.username = bookmark.username ) and ( bookmark.username = '' or bookmark.public_f='Y' ) order by category.name, subcategory.name, bookmark.name, bookmark.id Database Error Number: 2013 Message: Lost connection to MySQL server during query SQL Stmt: select category.name as category_name, bookmark.category_id, subcategory.name as subcategory_name, bookmark.subcategory_id, bookmark.id, bookmark.url, bookmark.name as bookmark_name, bookmark.ldesc, bookmark.keywords, rating.name as rating_name, bookmark.rating_id, bookmark.username from bookmark, category, subcategory, rating where ( bookmark.category_id = category.id and category.username = bookmark.username and bookmark.subcategory_id = subcategory.id and subcategory.username = bookmark.username and bookmark.rating_id = rating.id and rating.username = bookmark.username ) and ( bookmark.username = '' or bookmark.public_f='Y' ) order by category.name, subcategory.name, bookmark.name, bookmark.id

« previous php.general (#34035) next »