Link to home
Start Free TrialLog in
Avatar of KevinJavia
KevinJavia

asked on

MySql DATABASE creation date

Is there any way to find out MySql DATABASE creation date?
ASKER CERTIFIED SOLUTION
Avatar of davebytes
davebytes
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KevinJavia
KevinJavia

ASKER

Thanks for the reply davebytes.

I was wondering if this is possible using a query. Like if we want to show the status of the tables in a database, we can use 'SHOW TABLE STATUS' query.

Similarly is there a way to find out database information by query?
show table status returns the date of creation of the table. I do not think you can get the creation date of the database. MySQL does not store that.
As I mentioned, you can get the information on all the tables, which gives you the 'effective' date of the database.

Do a SHOW TABLE STATUS query, find the oldest Create_time column value, and that's a nice approximation -- assuming you haven't destroyed and recreated things (then again, if you've destroyed and recreated things, the date will be the date you did that!).

I haven't found a query access to database metadata -- might be it is being computed like the above, or that there are C/etc. APIs to access such data.

-d