看看这一段:5.10.2. The General Query Log If you want to know what happens within mysqld, you should start it with the --log[=file_name] or -l [file_name] option. If no file_name value is given, the default name is host_name.log This logs all connections and statements to the log file. This log can be very useful when you suspect an error in a client and want to know exactly what the client sent to mysqld. 使用的就是log参数
看你的查询日志是否打开 mysql> show variables like 'log'; +---------------+-------+ | Variable_name | Value | +---------------+-------+ | log | ON | +---------------+-------+ 1 row in set 如果没有,在配置文件中加log=/home/hostname.log
可以,你去查询下mysql的general-query-log日志,里面有记录的。
If you want to know what happens within mysqld, you should start it with the --log[=file_name] or -l [file_name] option. If no file_name value is given, the default name is host_name.log This logs all connections and statements to the log file. This log can be very useful when you suspect an error in a client and want to know exactly what the client sent to mysqld. 使用的就是log参数
mysql> show variables like 'log';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log | ON |
+---------------+-------+
1 row in set
如果没有,在配置文件中加log=/home/hostname.log