Menu
AWS OpsWorks
User Guide (API Version 2013-02-18)

mysql Attributes

Note

These attributes are available only on Linux stacks.

The mysql attributes specify the MySQL master configuration. For more information, see Server System Variables. For more information on how to override built-in attributes to specify custom values, see Overriding Attributes.

basedir

The base directory (string). The default value is '/usr'.

Copy
node[:mysql][:basedir]
bind_address

The address that MySQL listens on (string). The default value is '0.0.0.0'.

Copy
node[:mysql][:bind_address]
clients

A list of clients (list of string).

Copy
node[:mysql][:clients]
conf_dir

The directory that contains the configuration file (string). The default values are as follows:

  • Amazon Linux and RHEL: '/etc'

  • Ubuntu: '/etc/mysql'

Copy
node[:mysql][:conf_dir]
confd_dir

The directory that contains additional configuration files (string). The default value is '/etc/mysql/conf.d'.

Copy
node[:mysql][:confd_dir]
datadir

The data directory (string). The default value is '/var/lib/mysql'.

Copy
node[:mysql][:datadir]
grants_path

The grant table location (string). The default value is '/etc/mysql_grants.sql'.

Copy
node[:mysql][:grants_path]
mysql_bin

The mysql binaries location (string). The default value is '/usr/bin/mysql'.

Copy
node[:mysql][:mysql_bin]
mysqladmin_bin

The mysqladmin location (string). The default value is '/usr/bin/mysqladmin'.

Copy
node[:mysql][:mysqladmin_bin]
pid_file

The file that contains the daemon's process ID (string). The default value is '/var/run/mysqld/mysqld.pid'.

Copy
node[:mysql][:pid_file]
port

The port that the server listens on (number). The default value is 3306.

Copy
node[:mysql][:port]
root_group

The root group (string). The default value is 'root'.

Copy
node[:mysql][:root_group]
server_root_password

The server's root password (string). The default value is randomly generated.

Copy
node[:mysql][:server_root_password]
socket

The location of the socket file (string). The default value is '/var/lib/mysql/mysql.sock'. The default values are as follows:

  • Amazon Linux and RHEL: '/var/lib/mysql/mysql.sock'

  • Ubuntu: '/var/run/mysqld/mysqld.sock'

Copy
node[:mysql][:socket]
tunable Attributes

The tunable attributes are used for performance tuning.

back_log

The maximum number of outstanding requests (string). The default value is '128'.

Copy
node[:mysql][:tunable][:back_log]
innodb_additional_mem_pool_size

The size of the pool that Innodb uses to store internal data structures (string). The default value is '20M'.

Copy
node[:mysql][:tunable][:innodb_additional_mem_pool_size]
innodb_buffer_pool_size

The Innodb buffer pool size (string). The attribute value is set by AWS OpsWorks Stacks and depends on the instance type, but you can override it by using custom JSON or a custom attribute file.

Copy
node[:mysql][:tunable][:innodb_buffer_pool_size]
innodb_flush_log_at_trx_commit

How often Innodb flushes the log buffer (string). The default value is '2'. For more information, see innodb_flush_log_at_trx_commit.

Copy
node[:mysql][:tunable][:innodb_flush_log_at_trx_commit]
innodb_lock_wait_timeout

The maximum amount of time, in seconds, that an Innodb transaction waits for a row lock (string). The default value is '50'.

Copy
node[:mysql][:tunable][:innodb_lock_wait_timeout]
key_buffer

The index buffer size (string). The default value is '250M'.

Copy
node[:mysql][:tunable][:key_buffer]
log_slow_queries

The location of the slow-query log file (string). The default value is '/var/log/mysql/mysql-slow.log'.

Copy
node[:mysql][:tunable][:log_slow_queries]
long_query_time

The time, in seconds, required to designate a query as a long query (string). The default value is '1'.

Copy
node[:mysql][:tunable][:long_query_time]
max_allowed_packet

The maximum allowed packet size (string). The default value is '32M'.

Copy
node[:mysql][:tunable][:max_allowed_packet]
max_connections

The maximum number of concurrent client connections (string). The default value is '2048'.

Copy
node[:mysql][:tunable][:max_connections]
max_heap_table_size

The maximum size of user-created MEMORY tables (string). The default value is '32M'.

Copy
node[:mysql][:tunable][:max_heap_table_size]
net_read_timeout

The amount of time, in seconds, to wait for more data from a connection (string). The default value is '30'.

Copy
node[:mysql][:tunable][:net_read_timeout]
net_write_timeout

The amount of time, in seconds, to wait for a block to be written to a connection (string). The default value is '30'.

Copy
node[:mysql][:tunable][:net_write_timeout]
query_cache_limit

The maximum size of an individual cached query (string). The default value is '2M'.

Copy
node[:mysql][:tunable][:query_cache_limit]
query_cache_size

The query cache size (string). The default value is '128M'.

Copy
node[:mysql][:tunable][:query_cache_size]
query_cache_type

The query cache type (string). The possible values are as follows:

  • '0': No caching or retrieval of cached data.

  • '1': Cache statements that don't begin with SELECT SQL_NO_CACHE.

  • '2': Cache statements that begin with SELECT SQL_CACHE.

The default value is '1'.

Copy
node[:mysql][:tunable][:query_cache_type]
thread_cache_size

The number of client threads that are cached for re-use (string). The default value is '8'.

Copy
node[:mysql][:tunable][:thread_cache_size]
thread_stack

The stack size for each thread (string). The default value is '192K'.

Copy
node[:mysql][:tunable][:thread_stack]
wait_timeout

The amount of time, in seconds, to wait on a noninteractive connection. The default value is '180' (string).

Copy
node[:mysql][:tunable][:wait_timeout]
table_cache

The number of open tables (string). The default value is '2048'.

Copy
node[:mysql][:tunable][:table_cache]