The "To secure the MySQL server" section of the AWS tutorial recommends running the mysql_secure_installation command on the WordPress server to secure the MySQL installation.
Unfortunately, this command requires user input, so we can't use it with cfn-init. However, the command pretty much exactly follows the MySQL documentation's recommendations for "Securing the Initial MySQL Accounts" (obviously, they wrote it...) so we can just perform those tasks manually. A GitHub Gist has already been created for automating MySQL securing, and this comment looks to have exactly the code we need.
The "To secure the MySQL server" section of the AWS tutorial recommends running the
mysql_secure_installation
command on the WordPress server to secure the MySQL installation. Unfortunately, this command requires user input, so we can't use it withcfn-init
. However, the command pretty much exactly follows the MySQL documentation's recommendations for "Securing the Initial MySQL Accounts" (obviously, they wrote it...) so we can just perform those tasks manually. A GitHub Gist has already been created for automating MySQL securing, and this comment looks to have exactly the code we need.