Open AWS Console
In the AWS Console, Navigate to Services > Database, RDS
In the RDS screen, click on Databases, then click on Create Database.
In Choose a database creation method select Standard Create and, in Engine options use the settings:
In Database Features select One writer and multiple readers and, then in Templates select Dev/Test:
We are using Dev/Test selection on this exercise because there are no active users running the application. For a production environment prefer the Production template.
In Settings use the following settings:
After, in DB Instance size select Burstable classes, so change the size to db.t3.medium
In Availability & durability select Don’t create an Aurora Replica.
In Connectivity change the following settings:
In Database authentication select Password authentication
Expand Additional configuration
Click on Create database
Wait until the Available status:
Click on wordpressdb Writer database and write down the endpoint. We will use it later on this exercise.
Connect to the bastion host. If you’re not familiar on how to connect to the bastion host, follow these steps
Once connected to the bastion host, Open on putty:
Then, connect to the server wordpress-db. For EventEngine based events, the username and password are in your EventEngine team dashboard. If you are running this lab in your own AWS account, the username is user and the password will be the same that you used as a parameter when you launched the CloudFormation.
Now, let’s create the wordpress user in your new Aurora database. Run the following command (using the same password that you specified on step 6.) to connect to your Aurora MySQL database:
mysql -u admin -h <INSERT AURORA DNS VALUE FROM STEP 13> -p
Once connected to the mysql console, run the following commands to create the user wordpress. Replace the <USE SAME PASSWORD FROM STEP 6> before running the command:
The command bellow is single quote sensitive. Make sure your text editor doesn’t replace the single quote used bellow
HINT: Use a text editor to arrange the commands before past it into the putty
CREATE USER 'wordpress'@'%' IDENTIFIED BY '<USE SAME PASSWORD FROM STEP 6>'; GRANT ALL ON wordpressdb.* TO 'wordpress'@'%'; FLUSH PRIVILEGES; QUIT