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.

How to change password expiration in Oracle 11g

Another quick hint, this time for Oracle database administration.

Starting Oracle 11g the default profile that users belong to, if no other profile is specified, forces the password to be changed within 180 days. Previous versions didn’t have this “feature”, so this might result in a nice surprise when you find out that your application isn’t working anymore after 6 months.

Although security-wise it’s a good idea to change passwords now and then, sometimes it’s necessary for the password to remain the same. To change the expiration time to unlimited for the default profile, execute the following statement:

alter profile default limit password_life_time unlimited;