美文网首页
mysql config

mysql config

作者: 金色的清晨 | 来源:发表于2016-10-25 16:39 被阅读0次

1.show the state of slow query

show variables like '%slow%';
mysqladmin -u root -p variables | grep slow; //another way

2.enable slow query log and slow query time or log path

set global slow_query_log = 'ON';
set global long_query_time = '20';
set global slow_query_log_file ='/var/log/mysql/slow-query.log';

3.关闭日志同步

sync_binlog 0

4.索引之类的缓存大小

innodb_buffer_pool_size

相关文章

网友评论

      本文标题:mysql config

      本文链接:https://www.haomeiwen.com/subject/ctwruttx.html