打开my.ini文件
在[mysqld]的下面加上
log = c:/mysql_query.log.txt
重启mysql
以后你用可以用editplus查看你运行的sql了,不用在程序里一句句的用log打出来了.
附:mysql doc:
http://dev.mysql.com/doc/mysql/en/log_files.html
| log file | types of information logged to file |
| the error log | logs problems encountered starting, running, or stopping mysqld. |
| the isam log | logs all changes to the isam tables. used only for debugging the isam code. |
| the query log | logs established client connections and executed statements. |
| the update log | logs statements that change data. this log is deprecated. |
| the binary log | logs all statements that change data. also used for replication. |
| the slow log | logs all queries that took more than long_query_time seconds to execute or didn't use indexes. |
闽公网安备 35060202000074号