查看數據庫日志文件的大小
show binary logs;
刪除bin-log(刪除mysql-bin.00000*小于mysql-bin.000003所有日志)
如何登錄mysql數據庫。purge binary logs to 'mysql-bin.000003';
要想知道每個數據庫的大小的話,步驟如下:
1、進入information_schema 數據庫(存放了其他的數據庫的信息)
use information_schema;
mysql 日志文件,2、查詢所有數據的大小:
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables;
SELECT SUM(DATA_LENGTH)+SUM(INDEX_LENGTH) FROM information_schema.tables
3、查看指定數據庫的大小:
mysql數據庫界面。比如查看數據庫radius的大小
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='radius';
4、查看指定數據庫的某個表的大小
比如查看數據庫radius中 rm_users 表的大小
MySQL修改字段長度,select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='radius' and table_name='rm_users';
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态