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

后端 未结 16 1798
忘了有多久
忘了有多久 2020-11-22 17:17

In the footer of my page, I would like to add something like \"last updated the xx/xx/200x\" with this date being the last time a certain mySQL table has been updated.

16条回答
  •  感情败类
    2020-11-22 17:57

    The simplest thing would be to check the timestamp of the table files on the disk. For example, You can check under your data directory

    cd /var/lib/mysql/
    ls -lhtr *.ibd
    

    This should give you the list of all tables with the table when it was last modified the oldest time, first.

提交回复
热议问题