Skip to content

How to check the creation date of your databases (MySQL) with ease

  • by

The Query

If you have a lot of databases and you want to check their creation dates just run this SELECT.

If the ‘create_time’ is null then your user won’t have the necessary permissions.

SELECT table_schema, MAX(create_time) create_time
FROM information_schema.tables
-- WHERE TABLE_SCHEMA = 'myDb' -- uncomment for specific database and replace myDb
GROUP BY TABLE_SCHEMA
-- SORT BY create_time

Run the query in your favorite tool (like HeidiSQL)

More hints here

How to run MySQL 5.7 in K/Ubuntu 20.04 with docker here

Visits: 1175

Leave a Reply

Your email address will not be published. Required fields are marked *