mysqldatabaseconfigurationpersistmy.ini

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, which section should it be in my.ini?


Solution

  • Set global doesn't make persistent variables.

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

    [mysqld]
    wait_timeout=86400