I see there is no way in MySQL to drop tables using wildcards like 'temp_%', this simple PHP will help us do the following.
1. specify databases like 'anything%', so you check only the databases you need to.
2. specify tables like 'temp_%' , 'temp3_%' in an array so any number of temp wildcards possible.
3. loop through all databases and tables matching to drop the temp tables.
This makes it easy for you dropping many temp tables but be very careful about the wildcard, things may go completely wrong if you get the wildcard wrong.
Categories
DatabaseLicense
Creative Commons Attribution LicenseFollow MySQL DB Cleanup Script
Other Useful Business Software
Cloud-based help desk software with ServoDesk
What if You Could Automate 90% of Your Repetitive Tasks in Under 30 Days? At ServoDesk, we help businesses like yours automate operations with AI, allowing you to cut service times in half and increase productivity by 25% - without hiring more staff.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of MySQL DB Cleanup Script!