Azure/Databases

From Ever changing code
Jump to navigation Jump to search

Azure constantly improves databases offering on its cloud platform. So, things here can quickly get outdated.

Enable connectivity

As of writing this Azure Connection Security it breaks down to two concepts:

  • Rule Name (IP rules): is database-level access allowing IP(s) to connect from Internet, aka Limit to Hosts Matching: %, although you won't see this in the database
  • VNET Rules: is server-level rule that allows to connect from a specified VNET's subnet(s). All subnets must reside in the same region.

MySQL client connection

Below it's working example of connecting to Azure MySQL managed database service. Note:

  • required username myroot@db-1-rw-euw1-sandbox
    • myroot is a db user in SELECT User FROM mysql.user;
    • db-1-rw-euw1-sandbox is mysql database server name
mysql -h db-1-rw-euw1-sandbox.mysql.database.azure.com -u myroot@db-1-rw-euw1-sandbox -pPass123%


By default followign users are existing in Azure MySQL server

mysql> SELECT User FROM mysql.user;
+------------------+
| User             |
+------------------+
| az00cb7874715555 |
| myroot           |
| azure_superuser  |
| azure_superuser  |
| mysql.session    |
| mysql.sys        |
+------------------+
6 rows in set (0.01 sec)