'\" t .\" Title: ocf_heartbeat_mysql-proxy .\" Author: ClusterLabs contributors (see the resource agent source for information about individual authors) .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 04/13/2023 .\" Manual: OCF resource agents .\" Source: resource-agents 4.12.0-2 .\" Language: English .\" .TH "OCF_HEARTBEAT_MYSQL" "7" "04/13/2023" "resource-agents 4.12.0-2" "OCF resource agents" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ocf_heartbeat_mysql-proxy \- Manages a MySQL Proxy instance .SH "SYNOPSIS" .HP \w'\fBmysql\-proxy\fR\ 'u \fBmysql\-proxy\fR [start | stop | monitor | meta\-data | validate\-all] .SH "DESCRIPTION" .PP This script manages MySQL Proxy as an OCF resource in a high\-availability setup\&. .PP The default monitor operation will verify that mysql\-proxy is running\&. .PP The level 10 monitor operation is left out intentionally for possible future enhancements in conjunction with the admin plugin\&. .PP 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\&. .PP Tested with MySQL Proxy 0\&.8\&.1 and 0\&.8\&.3 on Debian 6\&.0\&. .SH "SUPPORTED PARAMETERS" .PP \fBbinary\fR .RS 4 Full path to the MySQL Proxy binary\&. For example, "/usr/sbin/mysql\-proxy"\&. .sp (optional, string, default "/usr/sbin/mysql\-proxy") .RE .PP \fBclient_binary\fR .RS 4 Location of the MySQL client binary\&. .sp (optional, string, default "mysql") .RE .PP \fBdefaults_file\fR .RS 4 Full path to a MySQL Proxy configuration file\&. For example, "/etc/mysql\-proxy\&.conf"\&. .sp (optional, string, no default) .RE .PP \fBproxy_backend_addresses\fR .RS 4 Address:port of the remote back\-end servers (default: 127\&.0\&.0\&.1:3306)\&. .sp (optional, string, default "127\&.0\&.0\&.1:3306") .RE .PP \fBproxy_read_only_backend_addresses\fR .RS 4 Address:port of the remote (read only) unpromoted\-server (default: )\&. .sp (optional, string, no default) .RE .PP \fBproxy_address\fR .RS 4 Listening address:port of the proxy server (default: :4040)\&. You can also specify a socket like "/var/run/mysql\-proxy\&.sock"\&. .sp (optional, string, default ":4040") .RE .PP \fBlog_level\fR .RS 4 Log all messages of level (error|warning|info|message|debug|) or higher\&. An empty value disables logging\&. .sp (optional, string, no default) .RE .PP \fBkeepalive\fR .RS 4 Try to restart the proxy if it crashed (default: )\&. Valid values: true or false\&. An empty value equals "false"\&. .sp (optional, string, no default) .RE .PP \fBplugins\fR .RS 4 Whitespace separated list of plugins to load (default: )\&. Note: The admin plugin will be auto\-loaded in case you specify an admin_* parameter\&. .sp (optional, string, no default) .RE .PP \fBadmin_address\fR .RS 4 Listening address:port of the admin plugin (default: 127\&.0\&.0\&.1:4041)\&. Note: The admin plugin will be auto\-loaded in case you specify an admin_* parameter\&. .sp (optional, string, default "127\&.0\&.0\&.1:4041") .RE .PP \fBadmin_username\fR .RS 4 Username for the admin plugin (default: )\&. Required since MySQL Proxy 0\&.8\&.1, if the admin plugin is loaded\&. Note: The admin plugin will be auto\-loaded in case you specify an admin_* parameter\&. .sp (optional, string, no default) .RE .PP \fBadmin_password\fR .RS 4 Password for the admin plugin (default: )\&. Required since MySQL Proxy 0\&.8\&.1, if the admin plugin is loaded\&. Note: The admin plugin will be auto\-loaded in case you specify an admin_* parameter\&. .sp (optional, string, no default) .RE .PP \fBadmin_lua_script\fR .RS 4 Script to execute by the admin plugin\&. Required since MySQL Proxy 0\&.8\&.1, if the admin plugin is loaded\&. Note: The admin plugin will be auto\-loaded in case you specify an admin_* parameter\&. .sp (optional, string, no default) .RE .PP \fBtest_table\fR .RS 4 Table to be tested in monitor statement (in database\&.table notation) .sp (optional, string, default "mysql\&.user") .RE .PP \fBtest_user\fR .RS 4 MySQL test user .sp (optional, string, no default) .RE .PP \fBtest_passwd\fR .RS 4 MySQL test user password .sp (optional, string, no default) .RE .PP \fBparameters\fR .RS 4 The MySQL Proxy daemon may be called with additional parameters\&. Specify any of them here\&. .sp (optional, string, no default) .RE .PP \fBpidfile\fR .RS 4 PID file .sp (unique, optional, string, default "/run/resource\-agents/mysql\-proxy\-RESOURCE_ID\&.pid") .RE .SH "SUPPORTED ACTIONS" .PP This resource agent supports the following actions (operations): .PP \fBstart\fR .RS 4 Starts the resource\&. Suggested minimum timeout: 30s\&. .RE .PP \fBstop\fR .RS 4 Stops the resource\&. Suggested minimum timeout: 30s\&. .RE .PP \fBreload\fR .RS 4 Suggested minimum timeout: 30s\&. .RE .PP \fBmonitor\fR .RS 4 Performs a detailed status check\&. Suggested minimum timeout: 20s\&. Suggested interval: 60s\&. .RE .PP \fBvalidate\-all\fR .RS 4 Performs a validation of the resource configuration\&. Suggested minimum timeout: 30s\&. .RE .PP \fBmeta\-data\fR .RS 4 Retrieves resource agent metadata (internal use only)\&. Suggested minimum timeout: 5s\&. .RE .SH "EXAMPLE CRM SHELL" .PP The following is an example configuration for a mysql\-proxy resource using the \fBcrm\fR(8) shell: .sp .if n \{\ .RS 4 .\} .nf primitive p_mysql\-proxy ocf:heartbeat:mysql\-proxy \e op monitor depth="0" timeout="20s" interval="60s" .fi .if n \{\ .RE .\} .SH "EXAMPLE PCS" .PP The following is an example configuration for a mysql\-proxy resource using \fBpcs\fR(8) .sp .if n \{\ .RS 4 .\} .nf pcs resource create p_mysql\-proxy ocf:heartbeat:mysql\-proxy \e op monitor OCF_CHECK_LEVEL="0" timeout="20s" interval="60s" .fi .if n \{\ .RE .\} .SH "SEE ALSO" .PP \m[blue]\fB\%http://clusterlabs.org/\fR\m[] .SH "AUTHOR" .PP \fBClusterLabs contributors (see the resource agent source for information about individual authors)\fR