巧用MySQL log调试程序

王朝mysql·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

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

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航