I've been struggling to get a MySQL database connected that resides on a Vultr Server. I've attempted to follow everything I can find for allowing remote access to a MySQL server and have had no luck.
The latest error I'm receiving is as follows:
Unable to connect. Error: Host 'ec2-35-90-103-132.us-west-2.compute.amazonaws.com' is not allowed to connect to this MySQL server
The hostname varies from test to test (e.g. ec2-35-90-103-132, ec2-35-90-103-133, ec2-35-90-103-134).
I'm at a loss as to how to resolve this. Any help is much appreciated.
My best guess is you need to whitelist Retool's IP addresses on the server.
I initially was getting an error for the IP addresses not being allow, but I added in firewall allows with
ufw allow from xx.xx.xx.xx to any port 3306 for the 4 IP addresses listed on the right hand side of the connection creation form and the link you included. After these rules were added, I started getting this host not allowed error. I've also noticed the variants of the host being listed in the error have different IP addresses than those listed in the link and specified in the required allowed IP list.
Are you doing the entire IP address range specified by the subnet mask? I know this bit me before I realized my mistake:
Yes, I've been using the subnet masks values when entering them in the ufw command. I've also added the individual IP addresses that would come from the subnet mask additions and that hasn't helped.
I finally got it to connect! I have a WAF running too, and I'm not sure if that was affecting things, but I whitelisted all of the IP addresses through that too. Then I created a new MySQL user with no IP address specified ('user_name'@'*') and I had to modify the MySQL configuration file bind-address specification to 0.0.0.0.
I thought I had gone through all of these things yesterday, with the exception of creating the '*' MySQL user, so I'm guessing that was it.
Thanks for the replies. I appreciate your help.