1: Query the entire database, the size of the entire database; the unit is converted to G:
select concat(round(sum(DATA_LENGTH/1024/1024/1024),2),'G') as data from information_schema.TABLES;
2: Query the mysql database, the size of a certain database:
select concat(round(sum(DATA_LENGTH/1024/1024/1024),2),'G') as data from information_schema.TABLES where table_schema = 'cxm_service_data_base';
3: View the size of a table in the library:
select concat(round(sum(DATA_LENGTH/1024/1024/1024),2),'G') as data from information_schema.TABLES where table_schema = 'cxm_service_data_base' and table_name = 'dk_sale_order_head';