How to know when was the last time a MySQL database was read or written?
Can you do this check at the table?
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?
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.
check the SHOW TABLE STATUS command; Example: SHOW TABLE STATUS WHERE name = "table_name_here", you need the value from the Update_time column
SHOW TABLE STATUS