查询数据库数据量大小
-- SHOW TABLE_SCHEMA;
-- use information_schema;
SELECT
concat(
round(
sum(data_length / 1024 / 1024),
2
),
'MB'
) AS DATA
FROM
TABLES
WHERE
table_schema = '你的数据库名字';
微信扫一扫
-- SHOW TABLE_SCHEMA;
-- use information_schema;
SELECT
concat(
round(
sum(data_length / 1024 / 1024),
2
),
'MB'
) AS DATA
FROM
TABLES
WHERE
table_schema = '你的数据库名字';
相关推荐