查看数据库各表容量大小:
select TABLE_NAME, concat(truncate(data_length/1024/1024,2),‘ MB‘) as data_size,
concat(truncate(index_length/1024/1024,2),‘ MB‘) as index_size
from information_schema.tables where TABLE_SCHEMA = ‘cjss‘
group by TABLE_NAME
order by data_length desc;
TABLE_SCHEMA 换数据名。
每天每个媒体生采集多少变文章:
SELECT copyfrom,DATE(FROM_UNIXTIME(ext_news.publishtime)),count(*) from ext_news group by copyfrom,DATE(FROM_UNIXTIME(ext_news.publishtime))
创建用户:
grant all privileges on vtdc.* to ‘joe’@‘10.163.225.87’ identified by ‘123‘;
原文地址:http://felixcode.blog.51cto.com/3264160/1592693