Drop tables where the last update is over 1 week ago I can see in PMA that it stores information for every table. 


I was wondering if there was an SQL query to drop any table in the database that have a last update time of more than 1 week ago?
All the metadata about tables are stored in the db named information_schema.

Try this:

SELECT
    TABLE_NAME
FROM
    information_schema.TABLES
WHERE 
    UPDATE_TIME &lt; (NOW()-INTERVAL 1 WEEK)


UPDATE: i forgot to mention this will get you all the tables that you need to drop, after that you can build the DROP statements.