MySQL changing runtime variables without restart

Setting Global variable, the followings are identical. (effective until service restart)

mysql> SET GLOBAL long_query_time = 3;
mysql> SET @@global. long_query_time = 3;

Setting Session variable, the followings are identical.  (effective until your session ends. Changes are not visible to other clients) 

mysql> SET SESSION long_query_time = 3;
mysql> SET @@session. long_query_time = 3;
mysql> SET @@long_query_time = 3;

More: MySQL.com Dynamic system variables

Reference: http://crazytoon.com/2007/07/23/mysql-changing-runtime-variables-with-out-restarting-mysql-server/

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s