I would like to checkout what SQLs are being executed via mysql_query($sql) over a set of scripts within an application - in order to debug it. Is it somehow possible that I can log the string $sql that are executed via php's mysql_query() function?

Or, it would be better if you can provide hints in accessing all queries ran by one particular user in the mysql server.