How do you get the last access (and/or write) time of a MySQL database?

后端 未结 3 2589
无人共我
无人共我 2021-02-20 18:57

How do you find out the last time a MySQL database was read or written to?

Can you even do that check per table?

3条回答
  •  我寻月下人不归
    2021-02-20 19:35

    SELECT UPDATE_TIME
    FROM   INFORMATION_SCHEMA.TABLES
    WHERE  TABLE_SCHEMA = 'dbname'
    AND    TABLE_NAME = 'tabname'
    

    Source: How can I tell when a MySQL table was last updated?

提交回复
热议问题