I'm currently using the script
SELECT SUM(TABLE_ROWS) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'Tables';
However, it's not accurate, because the engine used by my MySQL tables is InnoDB (I only realised this could be an issue now, be these databases have existed for a while).
Is there any way to get an exact count of every row in every table of a database with MySQL?
Cheers.
I think the only accurate (and slower) way is to do for every single table:
SELECT COUNT(*) FROM Table
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With