How to check the data size of each table in mysql

1.SHOW VARIABLES LIKE 'datadir';

This displays the path to the MySQL data directory. Under this path, you can find the folders of each database, and each database folder will contain .ibdfiles for each table.

2. Enter the corresponding directory

 3. Enter the corresponding db, for example, my own db is test

4. If we want to view the file size in M ​​units, we can execute ls -lh

 

Guess you like

Origin blog.csdn.net/u013933709/article/details/132324689