Skip to content

mysql job from cf-mysql/36.8.0

Github source: b77eb40 or master branch

Properties

cf_mysql

mysql

admin_password

Password for the MySQL server admin user

admin_username

Username for the MySQL server admin user

Default
root
advertise_host

Optional. IP address used to reach mysql from other cluster members If not provided, the IP is automatically determined.

binlog_enabled

Enable binlogs across all nodes

Default
true
binlog_expire_days

Time in days to store binlogs before purging

Default
7
character_set_server

Default character set. Note that while the MariaDB default is latin1, we default to utf8.

Default
utf8
cli_history

When set to false, disables cli history on the mysql vms.

Default
true
cluster_health
log_interval

Time in seconds between log entries for cluster health

Default
30
password

Password for the cluster logger health user

cluster_name

A unique name for this cluster. ONLY set before first deployment. DO NOT attempt to change an existing multi-node cluster.

Default
cf-mariadb-galera-cluster
cluster_probe_timeout

The maximum time, in seconds, that a new node will search for an existing cluster.

Default
10
collation_server

Default collation. Use SHOW COLLATION to view the valid collations for your character set.

Default
utf8_unicode_ci
disable_auto_sst

When disable_auto_sst is true, nodes unable to IST will be prevented from automatically deleting their data and performing an SST

Default
true
enable_galera

Advanced feature. Only use this when deploying a single MySQL node with no intention to run any other components of cf-mysql-release.

Default
true
enable_local_file

Allow or disallow clients to access local files

Default
false
event_scheduler

Events are named database objects containing SQL statements that are to be executed at a later stage, either once off, or at regular intervals.

Default
"OFF"
galera_healthcheck
db_password

Password used by the sidecar to connect to the database

endpoint_password

Password used by the sidecar endpoints for Basic Auth

endpoint_username

Username used by the sidecar endpoints for Basic Auth

Default
galera-healthcheck
port

Port used by sidecar process to listen on

Default
9200
galera_port

Port which Galera Cluster uses for communication across nodes

Default
4567
gcache_size

Cache size used by galera (maximum amount of data possible in an IST), in MB

Default
512
ib_log_file_size

Size of the ib_log_file used by innodb, in MB

Default
1024
innodb_buffer_pool_instances

Optional, number of buffer pool instances for InnoDB used if innodb_buffer_pool_size > 1GB

innodb_buffer_pool_size

Optional, the size in bytes of the memory buffer InnoDB uses to cache data and indexes of its tables

innodb_buffer_pool_size_percent

Set this to an integer which represents the percentage of system RAM to reserve for InnoDB’s buffer pool

Default
50
innodb_flush_log_at_trx_commit

Optional, control balance between performance and full ACID compliance. Valid values are: 0, 1, 2

Default
1
innodb_flush_method

Advanced configuration variable, consult the documentation before changing. Controls how MySQL opens data files; by default uses fsync(). Set to O_DIRECT if innodb_buffer_pool is sufficiently large that you can use O_DIRECT thus avoiding double-buffering.

innodb_large_prefix_enabled

Whether innodb_large_prefix is enabled

Default
true
innodb_lock_wait_timeout

Optional, time in seconds that an InnoDB transaction waits for an InnoDB row lock

innodb_log_buffer_size

Size in bytes of the buffer for writing log files to disk. Increasing this means larger transactions can run without needing to perform disk I/O before committing.

Default
32M
innodb_strict_mode

Whether innodb_strict_mode is enabled

Default
false
interrupt_notify_cmd

Path to a binary to run when SST is prevented from running

Default
""
log_conflicts

Defines whether the node logs additional information about conflicts. The values that were in conflict are logged, so it is possible for user data to end up in the logs.

Default
true
log_queries_not_using_indexes

Queries that don’t use an index, or that perform a full index scan where the index doesn’t limit the number of rows, will be logged to the slow query log.

Default
false
max_allowed_packet

The maximum size in bytes of a packet or a generated/intermediate string

Default
256M
max_connections

Maximum total number of database connections for the node

Default
1500
max_heap_table_size

The maximum size (in rows) to which user-created MEMORY tables are permitted to grow

Default
1.6777216e+07
max_open_files

Configure this number to be comfortably larger than the maximum number of tables you expect the database to support.

Default
65536
port

Port the mysql server should bind to

Default
3306
previous_admin_username

Optional. Previous username of the MySQL server admin user to be removed. Use this when changing the admin_username to avoid leaving around an unused user with root access.

remote_admin_access

When enabled, admin and roadmin will be able to connect from any remote host.

Default
false
roadmin_enabled

Whether read only user is enabled

Default
false
roadmin_password

Password for the MySQL server read-only admin user

seeded_databases

Set of databases to seed

Default
{}
Example
|+
  - name: db1
    username: user1
    password: pw1
  - name: db2
    username: user2
    password: pw2
server_audit_events

Enable audit logging and specify types of events that will be logged. If null, then logging is disabled

Example
connect,query_ddl,query_dml,query_dcl
server_audit_excluded_users

Other database users to exclude from audit logging

Default
[]
Example
|+
  - monitoring_user
  - other_excluded_user
  - bot_user
server_audit_excluded_users_csv

Additional database users to exclude from audit logging, will be combined with uses specified in server_audit_excluded_users

server_audit_file_rotate_size_in_mb

Size in MB of each audit log file

Default
100
server_audit_file_rotations

Number of audit file rotations to keep

Default
30
skip_name_resolve

Do not restrict connections to database based on hostname

Default
true
startup_timeout

Number of seconds that monit should wait for mysql to start before giving up

Default
60
table_definition_cache_size

Set this to a number relative to the number of tables the server will manage.

Default
8192
table_open_cache

Configure the number of table handles to keep open

Default
2000
tls
ca_certificate

CA Certificate which signed the server certificate

server_certificate

Server certificate presented to the client for TLS connection to the database

server_key

Private key of the server certificate for TLS connection to the database

tmp_table_size

The maximum size (in bytes) of internal in-memory temporary tables

Default
3.3554432e+07
userstat

Enables user statistics, adding several new information schema tables and new FLUSH and SHOW commands.

Default
false
wsrep_debug

When set to on, enables additional debugging output for the database server error log.

Default
"OFF"
wsrep_max_ws_rows

Maximum permitted number of rows per writeset.

Default
0
wsrep_max_ws_size

Maximum permitted size in bytes per writeset.

Default
1.073741824e+09

syslog_aggregator

address

IP address for syslog aggregator

port

TCP port of syslog aggregator

transport

Transport to be used when forwarding logs (tcp|udp|relp).

Default
tcp

Templates

Templates are rendered and placed onto corresponding instances during the deployment process. This job's templates will be placed into /var/vcap/jobs/mysql/ directory (learn more).

  • bin/cluster_health_logger_ctl (from cluster_health_logger_ctl.erb)
  • bin/drain (from drain.sh)
  • bin/galera-healthcheck_ctl (from galera-healthcheck_ctl.erb)
  • bin/gra-log-purger.sh (from gra-log-purger.sh.erb)
  • bin/gra-log-purger_ctl (from gra-log-purger_ctl.erb)
  • bin/mariadb_ctl (from mariadb_ctl.erb)
  • bin/pre-start (from pre-start-setup.erb)
  • bin/pre-start-execution (from pre-start-execution.erb)
  • config/cluster_health_logger_config.yml (from cluster_health_logger_config.yml.erb)
  • config/cluster_health_logger_setup.sql (from cluster_health_logger_setup.sql.erb)
  • config/disable_mysql_cli_history.sh (from disable_mysql_cli_history.sh.erb)
  • config/galera_healthcheck_config.yaml (from galera_healthcheck_config.yaml.erb)
  • config/galera_healthcheck_setup.sql (from galera_healthcheck_setup.sql.erb)
  • config/mariadb_ctl_config.yml (from mariadb_ctl_config.yml.erb)
  • config/mariadb_init (from mariadb_init.erb)
  • config/my.cnf (from my.cnf.erb)
  • config/mylogin.cnf (from mylogin.cnf.erb)
  • config/mysql_audit_logs.logrotate (from mysql_audit_logs.logrotate.erb)
  • config/syslog_forwarder.conf (from syslog_forwarder.conf.erb)
  • certificates/server-cert.pem (from server-cert.pem.erb)
  • certificates/server-key.pem (from server-key.pem.erb)

Packages

Packages are compiled and placed onto corresponding instances during the deployment process. Packages will be placed into /var/vcap/packages/ directory.