Friday, February 4, 2022

How to check current db changes in mysql

How to check last updates in database in mysql


here is code that can run in phpmyadmin or using using mysql console.

(i have check for last 30 days)

 
select table_schema as database_name,
       table_name,
       update_time
from information_schema.tables tab
where update_time > (current_timestamp() - interval 30 day)
      and table_type = 'BASE TABLE'
      and table_schema not in ('information_schema', 'sys',
                               'performance_schema','mysql')
      -- and table_schema = 'your database name' 
order by update_time desc;


It look like this


Enjoy...!!!


0 comments: