MySQL:监视查询 [英] MySQL : Monitor Queries
问题描述
我试图了解一个PHP-MySQL项目.该项目非常复杂,因此不可能逐行进行探索.
I am trying to understand a PHP - MySQL project. The Project is quite complex so exploring it line by line is quite impossible.
我想做的是,比较一个MySQL数据库的实例.
What I want to do is, compare the instances of a MySQL database.
说
1)MySQL已启动并正在运行.这是数据库的第一个实例. 2)用户从PHP前端登录,然后注销. 3)这是数据库的第二个实例.
1) MySQL is up and running. This is instance number one of the database. 2) A user logs in from PHP front end, and then logs out. 3) This is instance number two of the database.
我需要以友好的方式查看实例一和实例二之间的变化.
I need to see what changed between instance one and instance two, in a friendly way.
关于开源工具或任何其他技术的任何建议吗?
Any suggestions regarding open source tools or any other techniques?
推荐答案
您可以使用mysqldump拍摄数据库快照,登录/注销,然后再次转储数据库,并使用diff或winmerge之类的工具来比较更改.
You could use mysqldump to take a snapshot of the database, do your login/log out and then dump the database again and use a tool like diff or winmerge to compare the changes.
You could also turn on full query logging in mysql - this is just a single line to the config - http://dev.mysql.com/doc/refman/5.1/en/query-log.html
这篇关于MySQL:监视查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!