做窗帘的效果图网站,石家庄软件外包,站长平台,商城网站的建设定位参见pcttcnc2007博客腾飞 1.mysql的status信息命令: mysql show global status; 2.可以列出mysql服务器运行各种状态值#xff0c;另外#xff0c;查询mysql服务器配置信息语句#xff1a; mysql show variables; 3.连接数 经 常会遇见”mysql: error 1040: too man…参见pcttcnc2007博客腾飞 1.mysql的status信息命令: mysql show global status; 2.可以列出mysql服务器运行各种状态值另外查询mysql服务器配置信息语句 mysql show variables; 3.连接数 经 常会遇见”mysql: error 1040: too many connections”的情况一种是访问量确实很高mysql服务器抗不住这个时候就要考虑增加从服务器分散读压力另外一种情况是mysql配 置文件中max_connections值过小 mysql show variables like max_connections;------------------------| variable_name | value |------------------------| max_connections | 256 |------------------------ 这台mysql服务器最大连接数是256然后查询一下服务器响应的最大连接数 mysql show global status like max_used_connections; 4.慢查询 mysql show variables like slow%; -------------------------| variable_name | value |-------------------------| log_slow_queries | on || slow_launch_time | 2 |------------------------- mysql show global status like slow%; ----------------------------| variable_name | value |----------------------------| slow_launch_threads | 0 || slow_queries | 4148 |---------------------------- 配 置中打开了记录慢查询执行时间超过2秒的即为慢查询系统显示有4148个慢查询你可以分析慢查询日志找出有问题的sql语句慢查询时间不宜设置 过长否则意义不大最好在5秒以内如果你需要微秒级别的慢查询转载于:https://www.cnblogs.com/suncj/p/4175170.html