Reference no: EM133888924 , Length: word count:2500
Tutorial - Database on AWS Cloud using Virtual Machine
Installation and deployment of virtual machine
Implementation of RDS database on AWS Cloud
Implementation of RDS database on AWS Cloud
Let's create our first RDS instance
Login to the AWS Console > Service > Database > RDS > Create Database
Choose a database creation method > Choose MySQL from
the ‘Engine Option'
Choose the MySQL version 8.0.35
Choose the ‘Free Tier' from the ‘Template'
In the ‘Setting' section, put your database name: tutorialDbInstance, ‘Master user' name and ‘Master password' as you prefer. Finally, ‘Confirm password'. Hire Online Assignment help service for completing assignment!
DB instance size section, select db.t4g.micro Note: Activate ‘Include previous generation classes'
Storage section - Leave it as it is
Availability & durability: Leave it as it is
Connectivity: Select Default VPC
Additional connectivity configuration:
Database authentication: Select Password authentication
Additional configuration:
Database option > Initial database name:
tutorialDbInstance
Backup: Enable automatic backups > Select 0 day
Monitoring: Leave it
Maintenance: Optional
Deletion protection: Optional
Create database
Click create ElastiCache cluster
Let's create an EC2 instance
if prompted.
Create a new security group WebDMZ
Console > Service > EC2
Select Amazon Linux 2 AMI (HVM), SSD Volume Type
Select: t2.micro
Leave everything intact except:
Advanced Details: Paste the bootstrap script in the User data textbox, which is available in your course materials directory under the Week 7 & 8 folder.
Next > Add storage: Leave it as it is
Next > Add Tags: Key: Name, and Value:
WordpressServer
Create a new Key Pair, Name it as tutorial- keypair, download it, and save it in a suitable place in your machine.
Next > Select WebDMZ from the existing security groups
Press: Launch Instance
Click View Instance to look at the EC2 instance that you have created.
NOTE: Please delete older EC2 instance if any before starting.
Select ‘Security Group' from the left pan. We need to configure security group so that our webserver WebDMZ can talk to the database rds-launch-wizard using its MySQL port security group.
Select rds-launch-wizard, Press ‘Inbound' tab
Click Edit > Add Rule > Select MYSQL/Aurora
Source: Type your WebDMZ Security Group ID, and then Save.
Make sure your EC2 instance and RDS instance, both are live and online now.
Go to your RDS instance and check all the parameters like Connectivity, Monitoring, Logs & events, Configuration, Maintenance & backup, Tags. Finally, have a look at the ‘Endpoint & port', which we need to connect with the WordPress.
Go to the EC2 instance and grab the Public IP Address
Browse it in your browser.
That's it. Now we got the WordPress Welcome page.
Click Let's go! Tab.
Put your Database Name, Username, Password, Database Host.
Put your RDS endpoint URL here as Database Host
Click Submit button.
Hit the button Run the installation
You will get the Information needed page, where you need to put all the required information with a suitable Site Title.
Troubleshooting: If you can see that wp-config.php file is not there, which you need to create with the following contents. Copy the contents.
Go back to EC2 instance, connect your instance using SSH
NOTE: 2 ways, either way you can use to connect your EC2 instance.
Use the following command to have the Super User privileges:
sudo su
cd /var/www/html nano wp-config.php
Paste the contents on the nano editor and Save the file.
Check the database connectivity:
Install MySQL with the following command:
yum install mysql
At the root directory put the following command: mysql -h [rds_endpoint_address] -P 3306 -u [username] -p NOTE: Database username & password should be given here.
Enter the password and then, ENTER
Now, you are within your mysql database
On your ‘MySQL' command prompt, put the following command to get all the databases:
MySQL>show databases;
MySQL>Use [Your_Database_Name] to get the database that you created in your WordPress site.
Next, put the following command to view the tables of the database:
MySQL>show tables;
To view the list of users for this database, put the following command: MySQL>select *from wp_users;