MySQL Layer Reference - AWS OpsWorks

MySQL Layer Reference

Important

The AWS OpsWorks Stacks service reached end of life on May 26, 2024 and has been disabled for both new and existing customers. We strongly recommend customers migrate their workloads to other solutions as soon as possible. If you have questions about migration, reach out to the AWS Support Team on AWS re:Post or through AWS Premium Support.

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.