CodeOverload
CodeOverload

Reputation: 48475

What are some good MySQL debugging tools for php?

I'm looking for something like firebug but to monitor & log all the processed MySQL queries with the syntax, processing time, and fetched rows count and size. All that should be printed on the bottom of the page, so it should be something includable on the finish of the php code.

I'm not using any frameworks or libraries, just pure PHP and MySQL.

Any tools recommendations?

Thanks

Upvotes: 0

Views: 651

Answers (2)

regilero
regilero

Reputation: 30496

If you don't have complete access on the MySQl server, or if there're too much databases running there, and that you just want your app logs you could use "mysql proxy". It's a very usefull tools to catch all the communications (so queries as well) between your specific app and the Database. http://forge.mysql.com/wiki/MySQL_Proxy

Upvotes: 1

profitphp
profitphp

Reputation: 8354

Just use the mysql general log. Create an include file that runs these two queries and display the output of the 2nd one.

SET GLOBAL general_log = 'ON';

SELECT * FROM mysql.general_log;

Upvotes: 4

Related Questions