查看mysql所有执行SQL

上一篇 / 下一篇  2019-08-08 09:23:17 / 个人分类:mysql

mysql> show variables like 'general_log%';
+------------------+-----------------------------+
| Variable_name    | Value                       |
+------------------+-----------------------------+
| general_log      | OFF                         |
| general_log_file | /var/lib/mysql/compute1.log |
+------------------+-----------------------------+
2 rows in set (0.00 sec)

mysql> set global general_log='ON';
Query OK, 0 rows affected (0.05 sec)

mysql> show variables like 'general_log%';
+------------------+-----------------------------+
| Variable_name    | Value                       |
+------------------+-----------------------------+
| general_log      | ON                          |
| general_log_file | /var/lib/mysql/compute1.log |
+------------------+-----------------------------+
2 rows in set (0.00 sec)

mysql> flush privileages;

TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar