[摘要]+-----------------+-----------+ 1 row in set (0.00 sec) mysql> set global long_query_time=1; ...
+-----------------+-----------+
1 row in set (0.00 sec)
mysql> set global long_query_time=1;
<SPAN style="COLOR: #ff00ff">//设置成1秒,加上global,下次进mysql已然生效</SPAN>
Query OK, 0 rows affected (0.00 sec)
mysql> show variables like "%slow%";
<SPAN style="COLOR: #ff00ff"> //查看一下慢查询是不是已经开启 </SPAN>
+---------------------+---------------------------------+
关键词:Mysql慢查询设置的代码总结