Change MySQL variables without restart

A simple way to change runtime variables wihtout restarting mysql server.

First check the running value:

mysql> show variables like 'long_query%';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| long_query_time | 10 |
+-----------------+-------+

Change the value:

mysql> set @@long_query_time=2;

Check again:

mysql> show variables like 'long_query%';
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| long_query_time | 2 |
+-----------------+-------+

Success!

This entry was posted in MySQL and tagged . Bookmark the permalink.

One Response to Change MySQL variables without restart

  1. Kamal Maiti says:

    It’s NICE article …

    System Engineer.

Deja un comentario