There's two steps in that process:
a) Grant privileges. As root user execute:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password';
If we want to allow access to an specifc remote host the quey must be
GRANT ALL PRIVILEGES ON *.* TO root@65.181.118.232 IDENTIFIED BY 'mypass';
b) bind to all addresses:nano /etc/mysql /my.cnf
comment bind-address line and add this one 0.0.0.0
#bind-address = 127.0.0.1
bind-address = 0.0.0.0
and restart mysqlCentos) service mysql restart
Ubuntu) /etc/init.d/mysql restart
To check where mysql service has binded execute as root:
netstat -tupan | grep mysql
mysql -h 104.131.178.179 -u root -p7456
Where 7456 is your password
http://stackoverflow.com/questions/11223235/mysql-root-access-from-all-hosts
https://mariadb.com/kb/en/library/configuring-mariadb-for-remote-client-access/
No hay comentarios:
Publicar un comentario