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!


COMENTA

Tags disponibles: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Return to Top