PHP调用MYSQL INSERT是HANGING

IS there any logs on the MySQL server in regards to access? I am having an insert statement hang. It could be a subnet/firewall/interface configuration problem. I have the firewall open for the MySQL traffic, but it appears to be being blocked on an irregular basis. Sometimes it works and sometimes it doesn't. Any ideas for places to start looking in my logs?

To troubleshoot your query, grab a front end like SQLyog or MySql Workbench. You can run your queries in it and more directly interact with the database to see if the query itself is throwing the error.

If you're having a connection problem of some sort, the error message in your php app should provide some hints (timeout, server not available, etc.).

Next, you can enable error messages in PHP by changing settings in your php.ini, or adding a command in the script itself, see http://www.php.net/manual/en/book.errorfunc.php.

Finally, MySQL can log errors, but where it does and whether it does depends on your particular installation. Check your MySQL configuration file to see if error logging is enabled and to what location it outputs.

Post the error message you are getting if you need additional help.