Query for last database updated date in MySQL

Hi All,

Could some body provide me query to find last updated of the database in mYSQL.

Regards,
Sreeni
GK GKAsked:
Who is Participating?
 
GK GKConnect With a Mentor Author Commented:
Hi All,

I found the query

Select table_Schema,max(UPDATE_TIME) FROM information_schema.TABLES group by table_Schema;

UPDATE_TIME works for MyISAM. If required other Engines  we will look into each table in each schema to see if there is any date columns that are populated with latest.

Lot of thanks for support.

Regards,
0
 
Jayaraja JayaramanSharepoint Architect ConsultantCommented:
SELECT max(last_user_update) last_user_update
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'YOUR_DBNAME_HERE')

or

This Blog entry contains information on how to do it on SQL Server 2008 and 2005.
http://sqlblog.com/blogs/aaron_bertrand/archive/2008/05/06/when-was-my-database-table-last-accessed.aspx
0
 
GK GKAuthor Commented:
Thanks Jayaraj,

Will it work for MySQL ?


Regards.
Sreeni
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.