Find out the creation date of a MySQL table

Sometimes it’s useful to know when a certain database┬átable was created. For those cases the following statement can be used:

SELECT create_time
FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'DB_NAME'

In case you are interested in the creation time of a particular table, just add the appropiate WHERE-clause:

SELECT create_time
FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'DB_NAME'
AND table_name = 'TABLE_NAME'

+---------------------+
| create_time         |
+---------------------+
| 2011-12-22 12:32:34 |
+---------------------+
1 row in set (0.00 sec)

Update: As pointed out below in the comments, it is not possible to know the creation date of a database without access to the directory structure of MySQL.