MySQL: Table Creation Date
Thursday, January 14th, 2010I recently received an email from one of my clients regarding an error that she was getting on her website. It was a missing table error. I had made some changes over a month ago which required me to add a ‘states’ table. It was interesting because I knew that I had uploaded the table to her server and tested the new functionality.
I then remembered that the host provider had recently upgraded their servers (I use the same host provider). I ran into problems after the upgrade. Any changes that I had made on my site during the time of the upgrade were not reflected on the new server. I had draft posts that were no longer stored in the MySQL database.
To make a long story short (too late), I needed to test whether I created the ‘states’ table during the same time frame as the upgrade. Because I always make and test changes on my computer prior to uploading to a server, I decided to query the table schema on my computer to find out when I created the states table. I knew that MySQL stores database, table, table columns (etc) in the information_schema database. I just wasn’t sure which table the information would be stored in. After a quick search, I found a TABLES table, but I did not know which field to query to find the creation date:
This gave me a list of field names in the TABLES table. I found the field CREATE_TIME.
SELECT create_time FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = 'arrowcollegiatetour' AND table_name = 'states' |
I found that I created the ‘states’ table during the same time frame as the server upgrades, so I sent my client a message telling her to contact the host provider and have them recreate her site from their daily backups. I just love MySQL.



March 21st, 2011 at 4:06 pm
A powerful share, I just given this onto a colleague who was doing slightly analysis on this. And he actually purchased me breakfast as a result of I found it for him.. smile. So let me reword that: Thnx for the deal with! But yeah Thnkx for spending the time to debate this, I feel strongly about it and love studying extra on this topic. If doable, as you develop into expertise, would you thoughts updating your blog with extra particulars? It’s extremely useful for me. Large thumb up for this blog submit!
June 16th, 2011 at 1:27 pm
I am glad to be one of several visitors on this great website (:, thanks for posting.