ocf_heartbeat_mysql(7) Manages a MySQL database instance

SYNOPSIS

mysql [start | stop | status | monitor | validate-all | meta-data]

DESCRIPTION

Resource script for MySQL. It manages a MySQL Database instance as an HA resource.

SUPPORTED PARAMETERS

binary

Location of the MySQL binary (optional, string, default /usr/bin/mysqld_safe)

config

Configuration file (optional, string, default /etc/mysql/my.cnf)

datadir

Directory containing databases (optional, string, default /var/lib/mysql)

user

User running MySQL daemon (optional, string, default mysql)

group

Group running MySQL daemon (for logfile and directory permissions) (optional, string, default mysql)

log

The logfile to be used for mysqld. (optional, string, default /var/log/mysql.log)

pid

The pidfile to be used for mysqld. (optional, string, default /var/run/mysqld/mysqld.pid)

socket

The socket to be used for mysqld. (optional, string, default /var/run/mysqld/mysqld.sock)

test_table

Table to be tested in monitor statement (in database.table notation) (optional, string, default mysql.user)

test_user

MySQL test user (optional, string, default root)

test_passwd

MySQL test user password (optional, string, no default)

enable_creation

If the MySQL database does not exist, it will be created (optional, integer, default 0)

additional_parameters

Additional parameters which are passed to the mysqld on startup. (e.g. --skip-external-locking or --skip-grant-tables) (optional, string, no default)

SUPPORTED ACTIONS

This resource agent supports the following actions (operations):

start

Starts the resource. Suggested minimum timeout: 120.

stop

Stops the resource. Suggested minimum timeout: 120.

status

Performs a status check. Suggested minimum timeout: 60.

monitor

Performs a detailed status check. Suggested minimum timeout: 30. Suggested interval: 10.

validate-all

Performs a validation of the resource configuration. Suggested minimum timeout: 5.

meta-data

Retrieves resource agent metadata (internal use only). Suggested minimum timeout: 5.

EXAMPLE

The following is an example configuration for a mysql resource using the crm(8) shell:

primitive example_mysql ocf:heartbeat:mysql \
  op monitor depth="0" timeout="30" interval="10" 

AUTHOR

Linux-HA contributors (see the resource agent source for information about individual authors)