WEB开发网
开发学院WEB开发Jsp 巧用MySQL log调试程序 阅读

巧用MySQL log调试程序

 2008-01-05 20:13:13 来源:WEB开发网   
核心提示:打开my.ini文件在[MySQLd]的下面加上log = c:/mysql_query.log.txt重启mysql以后你用可以用editplus查看你运行的sql了,不用在程序里一句句的用log打出来了.附:Mysql Doc:http://dev.mysql.com/doc/mysql/en/Log_Files.

打开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.


Tags:MySQL log 调试

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接