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

How to know when was the last time a MySQL database was read or written?

Can you do this check at the table?

+7
sql database mysql
source share
3 answers
SELECT UPDATE_TIME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'dbname' AND TABLE_NAME = 'tabname' 

Source: How do I know when the last MySQL table was updated?

+6
source share

If your database is enabled, you can get the latest update time using mysqlbinlog.

If query logging is enabled in your database, you can get the latest query time (either update or select) by closing the query log.

+3
source share

check the SHOW TABLE STATUS command; Example: SHOW TABLE STATUS WHERE name = "table_name_here", you need the value from the Update_time column

-one
source share

All Articles