Purpose
You can use this statement to change the value of a specified parameter of OceanBase Database Proxy (ODP).
Notice
The ALTER PROXYCONFIG statement can modify only global parameters. Multi-level parameters must be modified by the REPLACE INTO statement. For more information, see the Modify parameters section in the View and modify parameters topic.
Syntax
ALTER PROXYCONFIG SET key=value;
The syntax is described as follows:
When you update the value of a parameter, if the parameter cannot be found or the new value is invalid, the corresponding error code is returned.
The value can be enclosed in single quotation marks (
'value') or double quotation marks ("value").In ODP, parameters can be stored both in the
ob_all_proxy_configtable and on the local disk, or only on the local disk.If you update parameters stored on the local disk, the modifications are not synchronized to the
ob_all_proxy_configtable. If you update parameters stored in theob_all_proxy_configtable, the modifications are synchronized to the local disk to ensure consistency.
Examples
Query the current value of the parameter to be modified.
show proxyconfig like 'client_tcp_keepidle';The output is as follows:
+---------------------+-------+-------------------------------------------------------------------------------------+-------------+---------------+ | name | value | info | need_reboot | visible_level | +---------------------+-------+-------------------------------------------------------------------------------------+-------------+---------------+ | client_tcp_keepidle | 5 | client tcp keepalive idle time, unit is second, 0 means use default value by kernel | false | USER | +---------------------+-------+-------------------------------------------------------------------------------------+-------------+---------------+Change the value of the parameter.
alter proxyconfig set client_tcp_keepidle=6;Query the new value of the parameter.
show proxyconfig like 'client_tcp_keepidle';The output is as follows:
+---------------------+-------+-------------------------------------------------------------------------------------+-------------+---------------+ | name | value | info | need_reboot | visible_level | +---------------------+-------+-------------------------------------------------------------------------------------+-------------+---------------+ | client_tcp_keepidle | 6 | client tcp keepalive idle time, unit is second, 0 means use default value by kernel | false | USER | +---------------------+-------+-------------------------------------------------------------------------------------+-------------+---------------+