check database date created

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
pinoydaddy
Forum Newbie
Posts: 2
Joined: Mon Jan 05, 2009 2:55 pm

check database date created

Post by pinoydaddy »

Hello to all.

Is there a way to check the database date when it was created? If there is how?

Any help will be appreciate very much.

Vick
User avatar
andyhoneycutt
Forum Contributor
Posts: 468
Joined: Wed Aug 27, 2008 10:02 am
Location: Idaho Falls

Re: check database date created

Post by andyhoneycutt »

It's not uber accurate, but this sql statement might do it for ya:

Code: Select all

SELECT MIN(CREATE_TIME) FROM TABLES WHERE TABLE_SCHEMA='<databasename>'
User avatar
andyhoneycutt
Forum Contributor
Posts: 468
Joined: Wed Aug 27, 2008 10:02 am
Location: Idaho Falls

Re: check database date created

Post by andyhoneycutt »

alternately you could issue a system command to get the date/time of the database directory creation time, at least you could do that for mysql, not sure about any other dbms.

-Andy
pinoydaddy
Forum Newbie
Posts: 2
Joined: Mon Jan 05, 2009 2:55 pm

Re: check database date created

Post by pinoydaddy »

Thanks for your reply. I will try it right away and get back with the result..

Thank you so much once again.

Vick
Post Reply