3

mysql日志记录(2)SQL执行记录

 2 years ago
source link: https://wakzz.cn/2017/11/05/mysql/%E6%97%A5%E5%BF%97%E8%AE%B0%E5%BD%95(2)SQL%E6%89%A7%E8%A1%8C%E8%AE%B0%E5%BD%95/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

mysql日志记录(2)SQL执行记录

祈雨的博客
2017-11-05

1、默认值

MySQL默认关闭全局SQL记录:

mysql> show variables like 'general_log';

53215630.jpg

2、开启SQL记录

启动全局SQL日志记录功能:

mysql> set global general_log=on;

45876940.jpg

全局日志记录默认为mysql/datadir/localhost.log

21878385.jpg


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK