How to turn on MySQL commands log

Questions and answers about how to do stuff
Post Reply
Posts: 61
Joined: 26 Oct 2016 02:17

How to turn on MySQL commands log

Post by webguyz » 25 Feb 2021 05:16

Trying to view a log of all SQL scripts sent to the Mariadb server to learn how to create a few scripts I want to run from an external server to keep an eye on total emails sent in one day and be alerted if any one from address is sending more then 200-300 emails which might indicate a email account thats been hacked

Tried adding this to maria.conf

general_log = 1
general_log_file = /var/log/mysql.log

But it never gets generated. Any who knows how to get a log I can few of all SQL commands?


Post Reply