码迷,mamicode.com
首页 > 数据库 > 详细

mysql 调优

时间:2018-05-28 22:40:57      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:using   nbsp   status   ons   time   ice   like   ble   strong   

1. show global status  查看所有状态 (可省略)

2. SHOW VARIABLES LIKE ‘max_connections‘ (查找最大连接数),然后修改 my.cnf 文件中 max_connections 的值 为1500

3.重启mysql        sudo service mysql restart

4.查看是否有死锁  show processlist 

5.开启慢查询

 1)在my.cnf 文件下,搜索 mysqld,然后咋其下行 添加

 long_query_time=2

log-slow-queries

log-queries-not-using-indexes 

 

 

 

mysql 调优

标签:using   nbsp   status   ons   time   ice   like   ble   strong   

原文地址:https://www.cnblogs.com/xiaoyii/p/9102403.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!