Hi, there, I have two droplet (vlife-portal & vlife-data ) with the same configuration. vlife-portal have a SSL.
Within both mysql.user, I have set up root@‘private IP’ and grant them related privileges.
And I followed the tutorial in the community to set up master & slave mysql, I tried to make vlife-portal as master and the other as slave. But after I start the slave, I find that I cant connect to vlife-portal.
Then I tested on vlife-portal in my terminal, I can connect to vlife-data’s Mysql directly. However, when I on the vlife-data, I cant connect to vlife-portal.
iptables / firewalls are not enabled. No bind-address in my.cnf. I tried bind-address to 0.0.0.0 still not work.
**Error msg: ** ERROR 2003 (HY000): Can’t connect to MySQL server on ‘private IP’ (110)
Could you please give me an hand on this? Thanks.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Click below to sign up and get $100 of credit to try our products over 60 days!
This comment has been deleted
This comment has been deleted
Hi @cetetek
Okay, so you actually have a firewall rule that specifically blocks MySQL:
And I don’t see MySQL listening on the port, but only on a socket, so maybe you have the
skip-networking
defined somewhere in the configuration.@cetetek
If you’re unable to connect on the private IP, it’s most likely due to MySQL not being bound to it. You may need to explicitly bind to it using:
Where
PRIVATE_IP
is the private network IP for your Droplet. Once you bind MySQL to a private IP, you need to create a new user that uses the connecting servers private IP.…
For example, let’s say that the MySQL servers private IP is 11.22.33.44 and the connecting servers IP is 22.33.44.55.
You’d set:
and then create a new user using the connecting servers private IP:
You’d sub out
dbname
,dbuser
, anddbpassword
with your own values.Hi @cetetek Can you run
sudo lsof -iTCP -sTCP:LISTEN -P
on the data server?