You are on page 1of 2

# yum groupinstall mariadb mariadb-client

# nano -c /etc/my.cnf

Enable mariadb to accept external connections:


# ip a s
# nano -c /etc/my.cnf
(…)
# CUSTOM SETTINGS
bind-address=xxxx.xxxx.xxxx.xxxx <-- (ip a s)

:wq!

# systemctl enable mariadb

# systemctl start mariadb


# mysql_secure_installation (y y y)
# systemctl restart mariadb
# mysql -u root -p

MariaDB [(none)]> show databases;


Use mysql;
Show tables;
Quit

# firewall-cmd –permanent –add-service=mysql


# firewall-cmd –reload
# ss -tulpn | grep mysql

# yum install -y telnet


# telnet xxxx.xxxx.xxxx.xxxx 3306

GRANT ACCESS ON MARIADB TO EXTERNAL CONNECTIONS:

# mysql -u root -p

MariaDB [(none)]> GRANT ALL ON *.* TO root@’xxxx.xxxx.xxxx.xxxx’ IDENTIFIED BY


‘password’;
FLUSH PRIVILEGES;
Quit

# nano -c /etc/my.cnf
(…)
# CUSTOM SETTINGS
bind-address=xxxx.xxxx.xxxx.xxxx
skip-networking=1

:wq!

# systemctl restart mariadb

*******************************************
CONNECT FROM OTHER HOST TO MARIADB:

# mysql -h xxxx.xxxx.xxxx.xxxx -u root -p


*******************************************

You might also like