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

后端 未结 16 1800
忘了有多久
忘了有多久 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:55

    I got this to work locally, but not on my shared host for my public website (rights issue I think).

    SELECT last_update FROM mysql.innodb_table_stats WHERE table_name = 'yourTblName';
    
    '2020-10-09 08:25:10'
    

    MySQL 5.7.20-log on Win 8.1

提交回复
热议问题