How do you refresh the MySQL configuration file without restarting?

后端 未结 4 1039
时光说笑
时光说笑 2020-12-25 11:01

Apache has such a feature, what about MySQL?

Does one exist?

4条回答
  •  借酒劲吻你
    2020-12-25 11:22

    Reloading the configuration file (my.cnf) cannot be done without restarting the mysqld server.

    FLUSH LOGS only rotates a few log files.

    SET @@...=... sets it for anyone not yet logged in, but it will go away after the next restart. But that gives a clue... Do the SET, and change my.cnf; that way you are covered. Caveat: Not all settings can be performed via SET.

    New with MySQL 8.0...

    SET PERSIST ... will set the global setting and save it past restarts. Nearly all settings can be adjusted this way.

提交回复
热议问题