Wednesday, February 16, 2022

Allow Remote Access to MariaDB Server on Rocky Linux 8.5

 in This Tutorial you will Learn " How To Allow Remote Access To MariaDB Server on Rocky Linux 8.5
[ Configuring MariaDB for Remote Client Access ]
MariaDB Server is one of the most popular open source relational databases.
_________________________________________________________________________________________
Server - Os:  Rocky Linux 8.5  64Bit      | IP -192.168.1.60        |Hostname - server.yourdomain.com
_________________________________________________________________________________________
cat /etc/system-release ; dnf groupinstall "Development Tools" -y ; dnf module -y install mariadb:10.3
systemctl enable --now mariadb ; systemctl start mariadb ; mysql_secure_installation
nano  /etc/my.cnf.d/charaset.cnf
[mysqld]
character-set-server = utf8mb4
[client]
default-character-set = utf8mb4

mysql -u root -p
GRANT ALL PRIVILEGES ON *.* TO 'remoteuser'@'%' IDENTIFIED BY 'new_password' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO 'remoteuser'@'192.168.1.80' IDENTIFIED BY 'new_password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;
firewall-cmd --add-service=mysql --permanent ; firewall-cmd --reload
systemctl restart mariadb ;systemctl status mariadb
Allow Remote Access to MariaDB Server on Rocky Linux 8.5

No comments:

Post a Comment