How to allow remote connects to a MySQL server?

mysql

(Dmitry Fedyuk) #1

Step 1

Remove the bind-address option from the MySQL consifuratiob file (/etc/mysql/my.cnf), and then restart the MySQL server.

serverfault.com/a/139324

Step 2

CREATE USER 'root'@'%' IDENTIFIED BY 'w7uwuSpu';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;

stackoverflow.com/a/1559992

Testing the result

mysql -h <host> -u root -p

1