Skip to content

UrunnaGlad/Client-Server-with-MySQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Client-Server-Architecture-with-MySQL

Client-Server is an architecture in which two or more computers are connected together over a network to send and receive requests between one another.

  1. Create and configure two linux based virtual servers (EC2 instances in AWS) mysql-server and mysql-client

AWS

instances

  1. Install MySQL on both servers

On mysql server install MySQL server software

sudo apt-get update
sudo apt-get install mysql-server

On mysql client install MySQL client software

sudo apt-get update
sudo apt-get install mysql-client
  1. Confirm that the both servers are runing
sudo systemctl status mysql

mysql-server

mysql-client

  1. Use mysql server's local IP address to connect from mysql client. MySQL sever uses TCP PORT 3306 by default. Hence, add a new in Inbound rule in mysql server.

  2. Configure MySQL server to allow. Replace 127.0.0.1 to 0.0.0.0 bind-address

  3. Restart mysql-server

sudo systemctl restart mysql
  1. From mysql client Linux Server connect remotely to mysql server Database Engine without using ssh. The mysql utility must be use to perform this action by:

Login to mysql-server

sudo mysql

mysql-login

Create a new user with remote access privileges

CREATE USER '<user-name>'@'<Client-server-ip>' IDENTIFIED WITH mysql_native_password BY '<password>';

Grant privileges to the remote user

GRANT <permissions> ON <database>.* TO 'remote_user'@'client_ip' WITH GRANT OPTION;

After creating the user and granting privileges, flush the privileges to ensure the changes take effect

FLUSH PRIVILEGES;

Exit mysql-server shell

exit
  1. Connect to mysql-server from mysql-cient and check that the remote MySQL server is successfully connected.
mysql -u client -p -h <mysql-server-ip>
SHOW DATABASES;

connect

Conclusion

This is a successfull implementation of a Client Server Architecture using MySQL Database Management System System

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published