MY-SQL Client-Server Architecture
DEPLOYMENT OF A FULLY FUNCTIONAL MY-SQL CLIENT/SERVER ARCHITECTURE
Client-Server Architecture
Client-server architecture involves the connecting together of one or more computers through a network to send and receive requests between one another.This type of architecture involves each machine taking up the role of a CLIENT who continually sends a request and the other machine receives and responds to the request sent which is known as a SERVER.
In this project, we would be working with the following:
A webserver that serves a client role connects and communicates back and forth with a database server which in turn receives and responds to the webserver.
The pre-requisite for the project is the following.
Fundamental Knowledge of Installing and downloading software
Basic Understanding of Linux Commands
AWS account login with EC2 instance
Internet connection
Implementation Steps:
Ensure you login with your details to your AWS console via the https://aws.amazon.com
Click on the EC2 link to create 2 instances namely MySQL server and MySQL client.
The 2 instances successfully launched and click to view Instance details with the IP address. Please note by default both instances were created in the same local virtual network, hence they would communicate on the same IP address.
Click the “Connect” button and copy the ssh client details we would be using on the git bash console.
Click on security button and then proceed to click the security group link.
Proceed to edit the inbound rules to add and save rules. Ensure you allocate port 3306 on MYSQL server with the IP address shown below. Always make sure the Ip address is only accessible by the MySQL client-server
Rules added.
Open git bash on Visual Studio code or whichever console is convenient to use. We are using git bash here with Visual Studio Code. Type YES to connect.
Proceed to update the lists of packages in the package manager.
Then we proceed to install MySQL server
We enable the MySQL server and then proceed to secure the server using a blank password.
After this, we connect back to our MySQL database server to create a database,grant all permission for the user created and finally flush privileges and quit the MySQL
We would need to configure the MySQL server to allow connection to remote host as shown below by editing the .cnf file and changing the bind address to 0.0.0.0 as seen below
CONFIGURATION OF MYSQL – CLIENT
Then we go back to AWS to connect the MYSQL -client-server
Click the “Connect” button and copy the ssh client details we would be using on the git bash console.
Click on the security button and then proceed to click the security group link.
Proceed to editing the inbound rules to add and save rules. Ensure you allocate port 3306 on MYSQL server with the IP address shown below. Always make sure the IP address is only accessible by the MySQL client-server
Rules added
Open git bash on Visual Studio code or whichever console is convenient to use. We are using git bash here with Visual Studio Code. Type YES to connect.
Proceed to update the lists of packages in the package manager.
Then we proceed to install MySQL client and confirm the initial IP address on the server
We then connect with the command below to the remote database server.
Then we confirm by showing the databases as shown below.
This shows that we have successfully deployed a fully functional My-SQL Client-Server set-up.
If this post was helpful, Would be great if you could click the clap button 👏below to show your support.
Thank you for reading💚👏 👏👏
Subscribe to my newsletter
Read articles from Emmanuel Yewande directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by