For MySQL> 5.1.11 or MariaDB
SET GLOBAL log_output = 'TABLE';SET GLOBAL general_log = 'ON';- Look at the
mysql.general_log table
If you want to output to the log file:
SET GLOBAL log_output = "FILE";SET GLOBAL general_log_file = "/path/to/your/logfile.log"SET GLOBAL general_log = 'ON';
As mentioned in jeffmjack's comments, these settings will be forgotten until the next session if you do not edit the configuration files (for example, edit /etc/mysql/my.cnf and then restart to apply the changes).
Now, if you want, you can tail -f /var/log/mysql/mysql.log
More information here: Server system variables
GTodorov Sep 28 '13 at 2:07 on 2013-09-28 02:07
source share