proxysql admin interface - setting listening ports and connections

1,280 views
Skip to first unread message

Gavin Conway

unread,
Oct 2, 2016, 4:56:03 AM10/2/16
to proxysql
Hi,

I'm trying to setup the mysql interfaces via the admin interface rather than the config file but can't seem to get the right combination of load and save to make this work. I can manually make the change to the runtime area 

MySQL [(none)]> USE runtime;
MySQL [runtime]> UPDATE global_variables SET variable_value='0.0.0.0:6033;0.0.0.0:3308;0.0.0.0:3310;0.0.0.0:3311;0.0.0.0:3312;/tmp/proxysql.sock' WHERE variable_name='mysql-interfaces';
MySQL [runtime]> select variable_name,variable_value from global_variables where variable_name='mysql-interfaces';
+------------------+-------------------------------------------------------------------------------------+
| variable_name    | variable_value                                                                      |
+------------------+-------------------------------------------------------------------------------------+
| mysql-interfaces | 0.0.0.0:6033;0.0.0.0:3308;0.0.0.0:3310;0.0.0.0:3311;0.0.0.0:3312;/tmp/proxysql.sock |
+------------------+-------------------------------------------------------------------------------------+
1 row in set (0.01 sec)



But if I try to do this via a single set of commands I can't seem to get the combination right or see the corresponding listening ports on the server. Are the ports better set via the config file or can they be dynamically changed/setup ?


My SQL segment;

UPDATE global_variables SET variable_value='0.0.0.0:6033;0.0.0.0:3308;0.0.0.0:3310;0.0.0.0:3311;0.0.0.0:3312;/tmp/proxysql.sock' WHERE variable_name='mysql-interfaces';
LOAD MYSQL VARIABLES TO RUNTIME;
SAVE MYSQL VARIABLES TO DISK;


Thanks
Gavin

René Cannaò

unread,
Oct 2, 2016, 5:09:15 AM10/2/16
to Gavin Conway, proxysql

Gavin,

There are 2 variables that cannot be changed at runtime:
mysql-intefaces
mysql-threads

Changing those require a restart.
The right way of changing is:

UPDATE global_variables SET variable_value='0.0.0.0:6033;0.0.0.0:3308;0.0.0.0:3310;0.0.0.0:3311;0.0.0.0:3312;/tmp/proxysql.sock' WHERE variable_name='mysql-interfaces';

SAVE MYSQL VARIABLES TO DISK;

PROXYSQL RESTART;

Note that LOAD MYSQL VARIABLES TO RUNTIME should not be executed.

Thanks


--
You received this message because you are subscribed to the Google Groups "proxysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gavin Conway

unread,
Oct 2, 2016, 6:16:43 AM10/2/16
to proxysql, mrgavi...@gmail.com
Understood, Thanks René
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages