How to remote mysql database on NAT VPS


NATVPS.ID – In this tutorial we will do the MySQL database remote on NAT VPS that we have. Remote database makes it easy for us to manage the MySQL database so that it can be accessed via GUI.

In this tutorial we will do a remote database on NAT VPS with the Ubuntu Operating System 20.04.6 LTS.

Prerequisite

Enter the NAT VPS terminal via SSH

You can use the SSH Client application such as CMD, Terius, Terminal, Termux, Putty, Tabby, or the like to access the NAT VPS terminal via SSH. For a complete tutorial on login to NAT VPS, you can visit the article How to Login Nat VPS.

How to remote mysql database on NAT VPS

Linux Dependencies Update

Before entering the database installation step, make sure you have updated and installed the Essential Linux dependencies. Use the following command to do this

apt update

MySQL-Server installation

Installation of MySQL-Server by running the following command

apt install mysql-server

MySQL configuration

In order for MySQL to be accessed by the public, we need to configure. The first configuration is that we need to change the bind-address in the file /etc/mysql/mysql.conf.d/mysqld.cnf to refer to the external IP address, we can add IP 0.0.0.0.

Restart MySQL with the following command

systemctl restart mysql

Create mysql users

After all the configuration above is complete, we can create new users for remote access. Entered as a root user with the following command

mysql -u root -p

Creating the user “Adminator” and Password “PasswordTutor0987”

CREATE USER 'admintutor'@'%' IDENTIFIED BY 'passwordtutor0987';

Grant Access User that we have created with the following command

GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES, RELOAD on *.* TO 'admintutor'@'%' WITH GRANT OPTION;

Flush Privileges to order the server to re -load the privilege table

FLUSH PRIVILEGES;

Try to enter the database with the user we have made

Domain forwarding to the mysql port

Before connecting to the database we need to do a domain forwarding on the MySQL port

Connect to the mysql database remote

After creating a new user, we can remote to the database, in the tutorial we will use Dbeaver. Enter the user’s credentials that we have made and the port matches the one in the forwarding port that we made before.

When the conquest of success appeared connected

Thus the MySQL Remote Database Tutorial on NAT VPS, hopefully this article helps users who want to do a remote database on NAT VPS owned.



Game Center

Game News

Review Film
Rumus Matematika
Anime Batch
Berita Terkini
Berita Terkini
Berita Terkini
Berita Terkini
review anime

Gaming Center