Open renecannao opened 9 years ago
Maybe there is a bug associated with this: LOAD MYSQL VARIABLES TO RUNTIME resets mysql-interfaces . To be verified
setting in runtime doesnt work and restart doesnt change port either.
I confirm that setting at runtime doesn't work, but this should work (just tested):
SET mysql-interfaces='0.0.0.0:6034;/tmp/proxysql.sock';
SAVE MYSQL VARIABLES TO DISK;
PROXYSQL RESTART;
This is not intuitive. But I can confirm it works.
Thanks!
On 7/15/16 5:08 PM, René Cannaò wrote:
|SET mysql-interfaces='0.0.0.0:6034;/tmp/proxysql.sock'; SAVE MYSQL VARIABLES TO DISK; PROXYSQL RESTART;|
Manjot, a bit more context:
all changes applied to memory and/or runtime are lost during a restart, therefore the changes need to be saved to disk to make them persistent across restart. That is why, in order, the variable need to changed (in memory, using SET
), saved to disk (SAVE MYSQL VARIABLES TO DISK
) and then restart (PROXYSQL RESTART
)
@renecannao @pondix in combination with https://github.com/sysown/proxysql/issues/1363 this has an extra side effect.
I need to add an additional VIP to my proxy instances and to support query_rules based on proxy_addr
I need to add this VIP's to mysql-interfaces
which will trigger me to restart the entire fleet of proxysql instances which will break any active connections to my other VIP's
hello @renecannao, is there any way to change the default values of mysql-interfaces
?
if I do a service proxysql restart
it takes my new default value?
Run in this today when i try changing the port. This is still an issue in v2.0.17.
I have tried to change it in the /etc/proxysql.cnf, but it's not noticed.
As mentioned by @renecannao :
I confirm that setting at runtime doesn't work, but this should work (just tested):
SET mysql-interfaces='0.0.0.0:6034;/tmp/proxysql.sock'; SAVE MYSQL VARIABLES TO DISK; PROXYSQL RESTART;
This helped me changing the port.
Should work for @h4rr21 too.
This is becoming a requirement in the context of a proxysql cluster, otherwise you have to reset your whole cluster just to add a listening port, or did I miss something ?
You can perform a rolling restart
oh, how do you do that ? I did not find a way to propagate the changes to the mysql-interfaces variable to the whole cluster
I realize that you were speaking about a kubernetes context which is not my case
WHY
Currently, changing mysql-interfaces requires a restarts. This is against the principle that proxysql can be reconfigured at runtime, although it is rare that someone would need to change mysql-interfaces at runtime.
WHAT
Allow to change binding address/port without the need to restart the proxy This is already done for the admin interface, so shouldn't be difficult to port it also for MySQL threads