首页 > 代码库 > mysql 语句集锦
mysql 语句集锦
查看数据库各表容量大小:
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‘;
mysql 语句集锦
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。