select CONCAT('|',COLUMN_NAME,'|',IF(COLUMN_COMMENT,1,0),'|') from information_schema.COLUMNS where table_name = 'web_site'; ##markdown
show global variables like "%timeout%"; ##查询数据库超时设置
查询数据库大小Mb
SELECT SUM(data_size+index_size) FROM
(SELECT
table_schema,
concat(
TRUNCATE (
sum(data_length) / 1024 / 1024,
2
)
) AS data_size,
concat(
TRUNCATE (
sum(index_length) / 1024 / 1024,
2
)
) AS index_size
FROM
information_schema. TABLES
GROUP BY
table_schema
ORDER BY
data_length DESC) AS t
网友评论