Error In PHP in linux
Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query in /var/www/html/GetTime2.php on line 63
Could not connect: Lost connection to MySQL server during query im using linux mandriva 2007 and I already uninstall the mysql5 then intall again coz i think its just a bugs but i saw it again what should i do? |
Looks like there is a connection issue to your database. Can you ping your mysql server? What mysql query application are you using?
|
Does this same error happen every time you run the same query?
How about other queries? Is there any pattern other obvious to it? It's an error message that would worry me if I saw it, because it looks like the query that you're passing is causing the DB connection to be dropped. If it's happening consistently in the same place, then I'd suggest there's something in that specific query which is causing MySQL to freak out. This could mean that you're triggering a fatal error, possibly you've found a bug in MySQL. Firstly, are you running the latest versions of PHP and MySQL? If not, consider updating and trying again -- if you have found a bug, it may have been fixed already. If you can get it to happen consistently, try printing the query to screen before it crashes, and then see what happens when you run that same query directly at the MySQL command prompt. That might give you a better diagnostic message of what exactly is going wrong. Also, once you know what the query is that's triggering it, you can try tweaking it to see if you can find out what part of the query is triggering it. Hope that helps, and I hope you manage to solve the problem. (if you do, please let us know what it was!) All the best, Spudley. |
Maybe your scripts have multiple opening commands for the same database, and the older database pointer becomes invalidated. Another possibility is that your script does some very time-consuming operation and some time-out occurs, but that would actually cease the script completely.
My guess is that this is rather due to your script, then anything related to the installation itself. Debian |
All times are GMT -5. The time now is 08:55 AM. |