OCF_HEARTBEAT_MYSQL-PROXY(7)
π ocf_heartbeat_mysql-proxy π
okay bestie, welcome to the OCF_HEARTBEAT_MYSQL() manual page β the resource is ocf_heartbeat_mysql-proxy, and it is literally giving βmanages a MySQL Proxy instanceβ main-character energy. pull up a chair, weβre going through every flag, every timeout, and every little detail together π«Ά
πΈ NAME πΈ
ocf_heartbeat_mysql-proxy β manages a MySQL Proxy instance. thatβs the whole NAME section, short and iconic β¨
β¨ SYNOPSIS β¨
mysql-proxy [start | stop | monitor | meta-data | validate-all]
π¦ DESCRIPTION π¦
okay so this script manages MySQL Proxy as an OCF resource in a high-availability setup. no cap.
The default monitor operation will verify that mysql-proxy is running. cute, simple, effective.
The level 10 monitor operation is left out intentionally for possible future enhancements in conjunction with the admin plugin. so if youβre looking for it, donβt come for me β itβs on purpose π
The level 20 monitor operation will perform a SELECT on a given table to verify that the connection to a back-end server is actually working. thatβs the real vibe check.
Tested with MySQL Proxy 0.8.1 and 0.8.3 on Debian 6.0. iconic time capsule behavior π
π SUPPORTED PARAMETERS π
every parameter, no skips, periodt. π
binaryβ full path to the MySQL Proxy binary. example:"/usr/sbin/mysql-proxy". type/default tea: optional, string, default"/usr/sbin/mysql-proxy". πclient_binaryβ location of the MySQL client binary. type/default tea: optional, string, default"mysql". β¨defaults_fileβ full path to a MySQL Proxy configuration file. example:"/etc/mysql-proxy.conf". type/default tea: optional, string, no default. πproxy_backend_addressesβAddress:portof the remote back-end servers. original says(default: 127.0.0.1:3306). type/default tea: optional, string, default"127.0.0.1:3306". π¦proxy_read_only_backend_addressesβAddress:portof the remote (read only) unpromoted-server. original literally shows(default: ). type/default tea: optional, string, no default. πΈproxy_addressβ listeningaddress:portof the proxy server. original says(default: :4040). you can also specify a socket like"/var/run/mysql-proxy.sock". type/default tea: optional, string, default":4040". πlog_levelβ log all messages of level(error|warning|info|message|debug|)or higher. an empty value disables logging. type/default tea: optional, string, no default. π«Άkeepaliveβ try to restart the proxy if it crashed. original says(default: ). valid values:trueorfalse. an empty value equals"false". type/default tea: optional, string, no default. πpluginsβ whitespace separated list of plugins to load. original says(default: ). note: the admin plugin will be auto-loaded in case you specify anadmin_*parameter. type/default tea: optional, string, no default. π₯admin_addressβ listeningaddress:portof the admin plugin. original says(default: 127.0.0.1:4041). note: the admin plugin will be auto-loaded in case you specify anadmin_*parameter. type/default tea: optional, string, default"127.0.0.1:4041". πadmin_usernameβ username for the admin plugin. original says(default: ). required since MySQL Proxy0.8.1, if the admin plugin is loaded. note: the admin plugin will be auto-loaded in case you specify anadmin_*parameter. type/default tea: optional, string, no default. πadmin_passwordβ password for the admin plugin. original says(default: ). required since MySQL Proxy0.8.1, if the admin plugin is loaded. note: the admin plugin will be auto-loaded in case you specify anadmin_*parameter. type/default tea: optional, string, no default. βadmin_lua_scriptβ script to execute by the admin plugin. required since MySQL Proxy0.8.1, if the admin plugin is loaded. note: the admin plugin will be auto-loaded in case you specify anadmin_*parameter. type/default tea: optional, string, no default. πtest_tableβ table to be tested in monitor statement (indatabase.tablenotation). type/default tea: optional, string, default"mysql.user". πtest_userβ MySQL test user. type/default tea: optional, string, no default. πtest_passwdβ MySQL test user password. type/default tea: optional, string, no default. π§parametersβ the MySQL Proxy daemon may be called with additional parameters. specify any of them here. type/default tea: optional, string, no default. πpidfileβ PID file. type/default tea: unique, optional, string, default"/run/resource-agents/mysql-proxy-RESOURCE_ID.pid". π
π SUPPORTED ACTIONS π
this resource agent supports the following actions (operations):
startβ starts the resource. suggested minimum timeout:30s. β¨stopβ stops the resource. suggested minimum timeout:30s. πreloadβ suggested minimum timeout:30s. π¦monitorβ performs a detailed status check. suggested minimum timeout:20s. suggested interval:60s. π₯validate-allβ performs a validation of the resource configuration. suggested minimum timeout:30s. πΈmeta-dataβ retrieves resource agent metadata (internal use only). suggested minimum timeout:5s. π
π₯ EXAMPLE CRM SHELL π₯
the following is an example configuration for a mysql-proxy resource using the crm(8) shell:
primitive p_mysql-proxy ocf:heartbeat:mysql-proxy \
op monitor depth="0" timeout="20s" interval="60s"
β EXAMPLE PCS β
the following is an example configuration for a mysql-proxy resource using pcs(8):
pcs resource create p_mysql-proxy ocf:heartbeat:mysql-proxy \
op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="60s"
π SEE ALSO π
the link drop: http://clusterlabs.org/ π«Ά
π AUTHOR π
ClusterLabs contributors (see the resource agent source for information about individual authors). π
thatβs the whole vibe β footer/source-version marker is OCF_HEARTBEAT_MYSQL(), and this page doesnβt print a date, so no timestamp tea here, bestie. mwah π
π¦ where this page comes from
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms