Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set a persistent global MySQL parameter

I set the following MySQL parameter:

set global wait_timeout=2147483

However, after server restart it reverted to its default value 28800. Isn't the set command persistent? In order to have this parameter persistent, should I edit a configuration file? Would that file be C:\Program Files\MySQL\MySQL Server 5.5\my.ini? If so, is it simply

wait_timeout=2147483

If so, under which section should it be in my.ini

like image 720
Jonathan Livni Avatar asked Dec 09 '22 04:12

Jonathan Livni


1 Answers

Set global doesn't make persistent variables.

You should write that under [mysqld] section in my.cnf:

[mysqld]
wait_timeout=86400
like image 65
Samet Atdag Avatar answered Dec 15 '22 01:12

Samet Atdag