MySql系统表可查询数据表的最后更新时间
select update_time from information_schema.`TABLES` where table_schema = 'cms' and table_name = 'user'
但InnoDB引擎下更新记录会有延迟。
可以通过设置状态有效期来解决,information_schema.`TABLES`中记录的update_time超过有效期才会更新,有效期设置为零则实时更新。
set session information_schema_stats_expiry=0;
set global information_schema_stats_expiry=0;