MySQL : Monitor Queries [closed]

2020-02-16 04:16发布

I am trying to understand a PHP - MySQL project. The Project is quite complex so exploring it line by line is quite impossible.

What I want to do is, compare the instances of a MySQL database.

Say,

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?

标签: php mysql linux
1条回答
2楼-- · 2020-02-16 04:45

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

查看更多
登录 后发表回答