mysql remote connection
at 2016-07-26 15:49:00.
if you get connection refused from a remote server to mysql you can try this:
edit /etc/mysql/mysql.conf.d/mysqld.cnf
and comment out the following line
#bind-address = 127.0.0.1
then service mysql restart
if it didn't work then try:
GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'1.2.3.4' IDENTIFIED BY 'PASSWORD' WITH GRANT OPTION;
view changes with:
SELECT * from information_schema.user_privileges where grantee like "'USERNAME'%";
and then run
FLUSH PRIVILEGES;
or you can use phpmyadmin for it on your local server, go to the mysql database, under user, copy the one for 127.0.0.1, then change the ip address to the one that you want to connect from and then
FLUSH PRIVILEGES; again.