Skip to content

Implementing a Client-Server Architecture using MySQL Database Management System (DBMS)

Notifications You must be signed in to change notification settings

titusnangitech/Client-Server-architecture-implemantation-using-MySql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 

Repository files navigation

Implementing a Client-Server Architecture using MySQL Database Management System (DBMS)

client-server

  • Created 2 ec2 instances i.e mysql client and mysql server

new ec2 instances created

  • MySQL server uses TCP port 3306 by default,so i opened it by creating a new entry in ‘Inbound rules’ in ‘mysql server’ Security Group. For extra security, i did not allow all IP addresses to reach my ‘mysql server’ – I allowed access only to the specific local IP address of my ‘mysql client’.

edited sg inbound rule

  • Populated the Mobaxterm with the mysql client details

populating client details

  • Populated the Mobaxterm with the mysql server details

populate mobaxterm for server

  • Connected to the mysql client and switched to root
 sudo -i

connected to client and swiched to sudo

  • Connected to the mysql server and switched to root
sudo -i

connected to the DB server and swicthed to sudo

  • update the apt peckage on the mysql server
 apt update -y

apt update for server

  • Install MySQL Server Software on the mysql server
apt install mysql-server

apt install mysql on the server

  • Enable mysql on the mysql server
systemctl enable mysql

enable mysql-server

  • Secured mysql server

securing mysql server

  • Connecting into mysql

    mysql
    

connecting to msql using mysql command

  • Created User and Database within the mysql-server
# Created User
 CREATE USER `remote_user`@`%` IDENTIFIED WITH mysql_native_password BY `password`;

# Created database
CREATE DATABASE test_db;

# Grant privileges
GRANT ALL ON test_db* TO `remote_user`@`%`WITH GRANT OPTION; 

create user and database within the server

  • configure MySQL server to allow connections from remote hosts.
  sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf

changing the msql file in th etc folder though vi

  • Replace ‘127.0.0.1’ to ‘0.0.0.0’

editing the sql file using vi

  • Restart mysql

restart sql

  • update the apt peckage on the mysql client
apt update -y

apt update for client

  • On mysql client Linux Server install MySQL Client software
apt install mysql-client

install mysql client

  • From mysql client Linux Server connect remotely to mysql server Database Engine without using SSH
  mysql -u remote_user -h 172.31.24.218 -p

connect to the mysql server from the mysql client

  • Checking that i have successfully connected to a remote MySQL server and i can perform SQL queries:
show databases;

use show databases to check if we now connected to the sql server

  • I have deployed a fully functional MySQL Client-Server

About

Implementing a Client-Server Architecture using MySQL Database Management System (DBMS)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published