OCF_HEARTBEAT_MYSQL(7) | OCF resource agents | OCF_HEARTBEAT_MYSQL(7) |
ocf_heartbeat_mysql - Manages a MySQL database instance
mysql [start | stop | status | monitor | promote | demote | meta-data | validate-all]
Resource script for MySQL. May manage a standalone MySQL database, a clone set with externally managed replication, or a complete master/slave replication setup. Note, when master/slave replication is in use, the resource must be setup to use notifications. Set 'notify=true' in the metadata attributes when defining a MySQL master/slave instance.
While managing replication, the default behavior is to use uname -n values in the change master to command. Other IPs can be specified manually by adding a node attribute ${INSTANCE_ATTR_NAME}_mysql_master_IP giving the IP to use for replication. For example, if the mysql primitive you are using is p_mysql, the attribute to set will be p_mysql_mysql_master_IP.
binary
(optional, string, default "/usr/bin/mysqld_safe")
client_binary
(optional, string, default "mysql")
config
(optional, string, default "/etc/mysql/my.cnf")
datadir
(optional, string, default "/var/lib/mysql")
user
(optional, string, default "mysql")
group
(optional, string, default "mysql")
log
(optional, string, default "/var/log/mysql/error.log")
pid
(optional, string, default "/var/run/mysqld/mysqld.pid")
socket
(optional, string, default "/var/run/mysqld/mysqld.sock")
test_table
(optional, string, default "mysql.user")
test_user
(optional, string, default "root")
test_passwd
(optional, string, no default)
enable_creation
(optional, boolean, default 0)
additional_parameters
(optional, string, no default)
replication_user
(optional, string, default "root")
replication_passwd
(optional, string, no default)
replication_port
(optional, string, default "3306")
replication_master_ssl_ca
(optional, string, no default)
replication_master_ssl_cert
(optional, string, no default)
replication_master_ssl_key
(optional, string, no default)
max_slave_lag
(optional, integer, default 3600)
evict_outdated_slaves
(optional, boolean, default false)
reader_attribute
A typical example for the use of this attribute would be to tie a set of IP addresses to MySQL slaves that can be read from.
This parameter is only meaningful in master/slave set configurations.
(unique, optional, string, default "readable")
This resource agent supports the following actions (operations):
start
stop
status
monitor
monitor (Master role)
monitor (Slave role)
promote
demote
notify
validate-all
meta-data
The following is an example configuration for a mysql resource using the crm(8) shell:
primitive p_mysql ocf:heartbeat:mysql \
op monitor depth="0" timeout="30s" interval="20s" \
op monitor role="Master" depth="0" timeout="30s" interval="10s" \
op monitor role="Slave" depth="0" timeout="30s" interval="30s"
ms ms_mysql p_mysql \
meta notify="true" interleave="true"
The following is an example configuration for a mysql resource using pcs(8)
pcs resource create p_mysql ocf:heartbeat:mysql \
op monitor OCF_CHECK_LEVEL="0" timeout="30s" interval="20s" \
op monitor role="Master" OCF_CHECK_LEVEL="0" timeout="30s" interval="10s" \
op monitor role="Slave" OCF_CHECK_LEVEL="0" timeout="30s" interval="30s" promotable
http://clusterlabs.org/
ClusterLabs contributors (see the resource agent source for information about individual authors)
12/14/2020 | resource-agents UNKNOWN |