Enable MySQL log
Contents
Sometimes we need to enable the MySQL log to see what SQL scripts have been created by our application. This is a way to enable MySQL log.
- Login to mysql in command line
- Run the scripts below:
1 | /* For Mac OS */ |
1 | /* For Linux */ |
It can be turned off with:
1 | SET global general_log = 0; |