Solve the problem that the long_query_time value of Mysql slow query cannot be modified

Reason: I want to modify the long_query_time value of MySQL on my computer to test the slow query function of MySQL.

However, no matter how you change it, the result of the show variables like 'long_query_time' command is still 10 (as shown in the figure below). After the change, restarting MySQL is still useless.

 

 Solution: Finally, I found that there is no long_query_time variable in my.ini (it may be a problem with the integrated environment tool I use phpstudy). So add long_query_time=1, restart MySQL, it will be effective.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324824465&siteId=291194637