Edit mariadb.conf:
# nano /etc/mysql/mariadb.conf.d/50-server.cnf
change: bind-address = 127.0.0.1
for: bind-address = 0.0.0.0
# service mariadb restart
This allow access from all universe IPs, it can dangerous, is better limit access to localnet.
For example:
bind-address = 192.168.1.0
Grant access from remote host:
with all privileges:
GRANT ALL ON database_name.* TO 'database_user@localhost' IDENTIFIED BY 'database_user_password';
Only read data (select):
GRANT SELECT ON *.* TO 'user'@'localhost' IDENTIFIED BY 'password';
and
FLUSH PRIVILEGES;
No hay comentarios:
Publicar un comentario