English Czech
How To Allow Remote Access MYSQL/MariaDB/MYSQL Community
Add New Rule to Firewalld
Open SQL port (3306) on FireWalld:
sudo firewall-cmd --permanent --zone=public --add-service=mysql
## OR ##
sudo firewall-cmd --permanent --zone=public --add-port=3306/tcp
Restart firewalld.service
systemctl restart firewalld.service
Editing Conf. Files:
Configuration files:
MySql -> `/etc/my.cnf/`
MySql Community -> `/etc/my.cnf.d/community-mysql-server.cnf`
MariaDB -> `/etc/my.conf`
you can ensure that with the following command `rpm -qc [package]`.
Navigate to the line that begins with the bind-address directive. It will look like this: you could set this directive to a wildcard IP address, either *, ::, or 0.0.0.0:
bind-address = 0.0.0.0
After changing this line, save and close the file and then restart the MySQL service:
sudo systemctl restart {mysqld|mariadb}
Creating a USER
CREATE USER 'your_username'@'host_ip_addr' IDENTIFIED BY 'your_password';