如何在mysql 5中记录特定表的插入/更新查询

时间:2022-12-15 13:01:46

does anyone knows if it is possible to log all insert/update query's for a specific table in mysql 5?

有谁知道是否可以记录mysql 5中特定表的所有插入/更新查询?

We got multiple applications querying the same database, so implementation of this in the data access layer (two many apps) is quite unrealistic, would be much easy if we can just turn a switch on in the configuration file in the database. I realize we could log all query's but that would be quite a performance hit.

我们有多个应用程序查询同一个数据库,因此在数据访问层(两个应用程序)中实现这个是非常不现实的,如果我们可以在数据库中的配置文件中打开一个开关就会很容易。我意识到我们可以记录所有查询,但这将是一个相当大的性能。

1 个解决方案

#1


This thing is called "audit trail". Google should give you a fair amount of answers.

这个东西叫做“审计线索”。谷歌应该给你相当多的答案。

#1


This thing is called "audit trail". Google should give you a fair amount of answers.

这个东西叫做“审计线索”。谷歌应该给你相当多的答案。