盾怪网教程:是一个免费提供流行杀毒软件教程、在线学习分享的学习平台!

Mysql慢查询设置的代码总结

时间:2025/3/15作者:未知来源:盾怪网教程人气:

[摘要]+---------------------+---------------------------------+ 4 rows in set (0.00 sec) mysql> set ...
+---------------------+---------------------------------+ 4 rows in set (0.00 sec) mysql> set slow_query_log='ON'; <SPAN style="COLOR: #ff00ff"> //加上global,不然会报错的</SPAN> ERROR 1229 (HY000): Variable 'slow_query_log' is a GLOBAL variable and should be set with SET GLOBAL mysql> set global slow_query_log='ON'; <SPAN style="COLOR: #ff00ff">//这个参数设置为ON,表示启用慢查询,可以捕获执行时间超过一定数值的SQL语句。</SPAN> Query OK, 0 rows affected (0.28 sec) mysql> show variables like "%slow%"; <SPAN style="COLOR: #ff00ff">//查看是否已经开启 </SPAN> +---------------------+---------------------------------+

关键词:Mysql慢查询设置的代码总结




Copyright © 2012-2018 盾怪网教程(http://www.dunguai.com) .All Rights Reserved 网站地图 友情链接

免责声明:本站资源均来自互联网收集 如有侵犯到您利益的地方请及时联系管理删除,敬请见谅!

QQ:1006262270   邮箱:kfyvi376850063@126.com   手机版