Enabling Global MySQL Log in Ubuntu
If you use (You should!) MySQL Prepared Statements, you may not be able to see how the final MySQL queries looks like, within your application, with all the bindings put into place. This is how to view them:
This should never be done in production environments.
Even in development environments, you should revert the changes as soon as you are done with your task.
The reason for this is that, when enabled, this tweak records all queries run in the MySQL system. All of them! The log file can and will get too big, and I suspect the performance of MySQL will degrade too.
- Now you can view the log in the above mentioned path.
You can periodically empty the file to only be left with the new changes.