contacts

Get All 146 Premium WordPress Themes for Just $59.99
One-Time Payment: Unlimited Use Across Unlimited Domains, Plus Free Lifetime Updates! Learn more

Get Total Count of Tables per Database in MySQL

Since most hosting providers restrict the number of tables per database, it’s a good idea to check the total number of tables to avoid hitting the quota. Here is how it can be done if you use MySQL:

Login to your Hosting Admin Panel and open phpMyAdmin or other tool allowing you to handle the administration of MySQL and executing custom SQL queries over your databases.

Then execute the following SQL script:

select table_schema as 'database',
    count(*) as 'tables'
from information_schema.tables
where table_type = 'BASE TABLE'
group by table_schema;

It will return a table with 2 columns: database names and number of tables per each.