I am having an issue and I can't seem to find any solution to this. I have a remote server that I connect exclusively via SSH. I just cannot connect to the database remotely and I keep getting this error:
ERROR 2003 (HY000): Can't connect to MySQL server on 'SERVER_IP_ADDRESS' (10061)
If I try it on phpmyadmin, then I get the following (the settings might be wrong though):
No connection could be made because the target machine actively refused it.
I added a new user for this purpose with the following command:
GRANT ALL PRIVILEGES ON test_db.* TO 'user_name'@’SERVER_IP_ADDRESS’ IDENTIFIED BY ‘pass_word’;
I modified the config file with bind-address to 0.0.0.0 and sometimes even comment it outright. Finally, I allowed all traffic with the command:
sudo ufw allow mysql
I checked and the port 3306 is being actively listened to.
I honestly can't find anything else, everybody repeats the same thing. Assistance is appreciated.