MySQL Layer Reference - AWS OpsWorks

MySQL Layer Reference

Important

AWS OpsWorks Stacks is no longer accepting new customers. Existing customers will be able to use the OpsWorks console, API, CLI, and CloudFormation resources as normal until May 26, 2024, at which time they will be discontinued. To prepare for this transition, we recommend you transition your stacks to AWS Systems Manager as soon as possible. For more information, see AWS OpsWorks Stacks End of Life FAQs and Migrating your AWS OpsWorks Stacks applications to AWS Systems Manager Application Manager.

Note

This layer is available only for Linux-based stacks.

The MySQL layer supports MySQL, a widely used relational database management system. AWS OpsWorks Stacks installs the most recent available version, which depends on the operating system. If you add a MySQL instance, the needed access information is provided to the application server layers. You must write custom Chef recipes to set up master–master or master–slave configurations.

Short name: db-master

Compatibility: A MySQL layer is compatible with the following layers: custom, lb, memcached, monitoring-master, nodejs-app, php-app, rails-app, and web.

Open ports: A MySQL layer allows public access to port 22(SSH) and all ports from the stack's web servers, custom servers, and Rails, PHP, and Node.js application servers.

Autoassign Elastic IP addresses: Off by default

Default EBS volume: Yes, at /vol/mysql

Default security group: AWS-OpsWorks-DB-Master-Server

Configuration: To configure a MySQL layer, you must specify the following:

  • Root user password

  • MySQL engine

Setup recipes:

  • opsworks_initial_setup

  • ssh_host_keys

  • ssh_users

  • mysql::client

  • dependencies

  • ebs

  • opsworks_ganglia::client

  • mysql::server

  • dependencies

  • deploy::mysql

Configure recipes:

  • opsworks_ganglia::configure-client

  • ssh_users

  • agent_version

  • deploy::mysql

Deploy recipes:

  • deploy::default

  • deploy::mysql

Shutdown recipes:

  • opsworks_shutdown::default

  • mysql::stop

Installation:

  • AWS OpsWorks Stacks uses the instance's package installer to install MySQL and its log files to their default locations. For more information, see MySQL Documentation.