-
J james moved this topic from Support
-
J james marked this topic as a regular topic
-
-
When I try to connect nc -v mydb.mysql.database.azure.com 3306 from my Cloudron server to the Azure DB, it connects successfully.
I did not find any error's in Logs. Can you help me debug this?
-
Hello @webliska
nc
only checks the ports' availability.
Unfortunately, I can't provide full support for Azure Database for MySQL.
But, you should check out the following article https://learn.microsoft.com/en-us/azure/mysql/flexible-server/concepts-networking-publicFrom this page:
Only the IP addresses you allow have permission to access your Azure Database for MySQL Flexible Server instance. By default, no IP addresses are allowed. You can add IP addresses when initially setting up your server or after your server has been created.
The user that tries to connect is also important. Not every MySQL User is allowed to access the server from anywhere.
Also, this page: https://learn.microsoft.com/en-us/azure/mysql/how-to-create-users#create-a-nonadmin-userNote: on
CREATE USER 'username'@'host'
.
In many guides for'host'
the value%
is used to allow everything, which is considered a bad practice.
A good example is here: https://www.digitalocean.com/community/tutorials/how-to-allow-remote-access-to-mysql#step-2-create-a-remote-mysql-userMaybe these tips already help you resolve your issue.