#1533 Feature request: show database creation date

Needs_decision
wont-fix
nobody
None
5
2014-08-20
2014-07-04
admirau
No

Feature request: show database creation date, ability to sort (e.g. latest first) on the database list page.

It would be great to have the database creation date on the database list in standard view, or when you enable statistics view.

Discussion

  • Isaac Bennetch
    Isaac Bennetch
    2014-07-29

    I've done some searching and can't see a way to find the creation date of a database. Are you aware of any way?

     
  • Isaac,
    For MySQl, try this,
    SELECT TABLE_SCHEMA, CREATE_TIME FROM INFORMATION_SCHEMA.TABLES;

     
  • Isaac Bennetch
    Isaac Bennetch
    2014-08-19

    Thanks Chanaka, but as far as I can tell that only shows table creation time (which phpMyAdmin already does anyway), what we're trying to solve is the creation time of the database. Am I mistaken?

     
  • Isaac,
    No you got it correctly. I misunderstood that.

    Btw, neither me could find a way to get the DB create time using a query. But we can get the create time of the first table. (SELECT MIN(create_time)
    FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'my_database'). But still it's not pretty accurate for all scenarios.

    What I was thinking of the MySQL data directory. When creating a db 'mydb', there will be a directory 'mydb' and inside that, db.opt file. I think what we are looking for is the last modified time of this 'db.opt' file. Still accessing these file from PMA is doubtfull. (I check with 5.5.34-0ubuntu0.13.04.1 - (Ubuntu))

     
  • Isaac Bennetch
    Isaac Bennetch
    2014-08-20

    • status: open --> wont-fix
     
  • Isaac Bennetch
    Isaac Bennetch
    2014-08-20

    I don't think this is something we can reliably determine at this time. If MySQL adds this feature, we'll certainly implement it at that time.

    Thanks for your suggestion.