How can I get a rowcount for all tables in MySQL. I can do this databases by database if that is easier.
The purpose is to do a cursory check on my database replication that was just setup.
|
How can I get a rowcount for all tables in MySQL. I can do this databases by database if that is easier. The purpose is to do a cursory check on my database replication that was just setup.
| |||
|
feedback
|
|
try mk-table-checksum instead. docs might be scary but together with mk-checksum-filter it's very useful tool. | |||
|
feedback
|
|
If you are want to check on your replication setup, have you considered using:
| |||
|
feedback
|
|
./mysql -utest -ptest dbname -e 'show table status\G' | awk '/Name/ {name = $2}; /Rows/ {print $2"\t"name}' | sort -gr | |||
|
feedback
|
|
A very crisp and clean way to retrieve all the tables along with its row count | |||
|
feedback
|