Database Logging
MySQL Logging
- Enable Loggin and Replication in
/etc/mysql/my.cnf
- Restart MYSQL
- Check the log file
or Login as root to MySQL and execute
SET global general_log_file='/tmp/mysql.log';
SET global log_output = 'file';
SET global general_log = on;
PostgreSQL Enable Database Logging
Look for postgresql.conf
file to edit
### Windows
Restart the Application to apply the new settings. We can do this by launching services.msc
from the Runcommand window and finding the Applications service
Find failed queries in the log file
### Linux Restart postgresql
Check the logs
MariaDB Query Debugging
- Edit
mysql.log
to enable loggin
-
Restart mysql
-
Tail the log file
PHP apache2 Logging
Enable the PHP display_errors
directive
- Modify
/etc/php5/apache2/php.ini
- Append the following lines to the file
- Restart
apache2