5.7默认 innodb_read_io_threads=4 innodb_write_io_threads=4 innodb_change_buffer_max_size=25 innodb_thread_concurrency=0(不限制) innodb_buffer_pool_load_at_startup=on --要设置为on innodb_buffer_pool_dump_at_shutdown=on --要设置为On
innodb_old_blocks_pct --默认37
innodb_old_blocks_time--默认1000
lower_case_table_names=0(区分大小写)
explicit_defaults_for_timestamp=on
root@localhost 10:21: [(none)]> show global status like '%innodb_log_wait%';
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| Innodb_log_waits | 0 |
+------------------+-------+
1 row in set (0.00 sec)
root@localhost 11:03: [(none)]> show global status like '%binlog_cache%';
+-----------------------+-----------+
| Variable_name | Value |
+-----------------------+-----------+
| Binlog_cache_disk_use | 79020 |
| Binlog_cache_use | 112372305 |
+-----------------------+-----------+
统计每个库大小:
select table_schema,sum(data_length)/1024/1024/1024 as data_length,sum(index_length)/1024/1024/1024 as index_length,sum(data_length+index_length)/1024/1024/1024 as sum_data_index from information_schema.tables where table_schema!='information_schema' and table_schema!='mysql' group by table_schema;
统计每个表大小:
select table_name,data_length,index_length,sum(data_length+index_length)/1024/1024 as total_size from information_schema.tables where table_schema='cus_0042' group by table_name order by total_size desc; 统计所有数据库的大小: select sum(data_length+index_length)/1024/1024/1024 from information_schema.tables;
