我希望看到所有mysql运行查询(就像mssql中的profiler )我尝试过jet profiler,但我没有得到与mssql profiler相同的结果。有没有这样的工具或者内置的选项来输出到日志?
我会说出更多的信息,也许有人会想出解决办法。我使用entity框架从.net连接到mysql。有一些查询可以在开发环境中工作,但不能在生产环境中工作。我希望看到解析后的查询,看看哪里出了问题。
发布于 2012-08-19 20:41:53
您可以编辑配置文件并启用日志记录。在my.cnf中查找:
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# log = /var/log/mysql/mysql.log取消log行的注释,然后可以使用tail监视查询:
tail -f /var/log/mysql/mysql.log您需要重新启动服务器才能应用新配置。
https://stackoverflow.com/questions/12026488
复制相似问题