1.3. Configuring network access to MariaDB
You must configure MariaDB to listen on network interfaces and open firewall ports to allow remote client access to the database server.
Procedure
Edit the
[mysqld]section of the/etc/my.cnf.d/mariadb-server.cnffile. You can set the following configuration directives:bind-address- is the address on which the server listens. Possible options are:- a host name
- an IPv4 address
- an IPv6 address
skip-networking- controls whether the server listens for TCP/IP connections. Possible values are:- 0 - to listen for all clients
- 1 - to listen for local clients only
-
port- the port on which MariaDB listens for TCP/IP connections.
To ensure that clients can access the database server on the network, open the port in the firewall:
# firewall-cmd --permanent --add-service=mysql # firewall-cmd --reloadRestart the
mariadbservice:# systemctl restart mariadb.service