MYSQL 监控数据库SQL语句 查看数据库执行语句

原文:
https://blog.csdn.net/xuheng8600/article/details/79823875

主要就是这两句sql语句

show variables like 'general_log%'
set global general_log='ON';

注意:用root用户执行哦,不然其他用户怕权限不足

权限不足会有这个提示

1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation

我本机的日志在这里的


原文地址:https://www.cnblogs.com/guxingy/p/15633309.html