– 1.切换
USE information_schema;
– 2.查看数据库使用大小
SELECT
concat(
round(
sum(data_length / 1024 / 1024),
2
),
'MB'
) AS DATA
FROM
TABLES
WHERE
table_schema = 'user_server';
– 3.查看表使用大小
SELECT
concat(
round(
sum(data_length / 1024 / 1024),
2
),
'MB'
) AS DATA
FROM
TABLES
WHERE
table_schema = 'user_server'
AND table_name = 'log_info';