## How to enable the MySQL/MariaDB general query logs 1. Enter to MySQL/MariaDB server command-line tool (change root with your username and password): ```sh mysql -u root -proot ``` 2. Set the general log file path: ```sql SET GLOBAL general_log_file='/var/log/mysql/mycustom.log'; ``` 3. Set the log output to file format: ```sql SET GLOBAL log_output = 'FILE'; ``` 4. Enable the server general log: ```sql SET GLOBAL general_log = 'ON'; ``` 5. Show the general log settings: ```sql SHOW VARIABLES LIKE "general_log%"; ``` 6. Try to execute your own SQL query from your app or command-line tool... 7. View the general log file content: ```sh less /var/log/mysql/mycustom.log ``` 8. Disable the general server log: ```sql SET GLOBAL general_log = 'OFF'; ```