Difference between revisions of "Azure/Databases"
< Azure
Jump to navigation
Jump to search
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Azure constantly improves databases offering on its cloud platform. So, things here can quickly get outdated. | Azure constantly improves databases offering on its cloud platform. So, things here can quickly get outdated. | ||
= SQL Servers and SQL databases = | |||
= Enable connectivity = | These are Microsoft SQL server implementations | ||
= Azure Database MySQL servers = | |||
== Enable connectivity == | |||
As of writing this Azure '''Connection Security''' it breaks down to two concepts: | 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 | * '''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. | * '''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. Virtual network rules are based on Virtual Network service endpoints. | ||
= MySQL client connection = | == MySQL client connection == | ||
Below it's working example of connecting to Azure MySQL managed database service. Note: | Below it's working example of connecting to Azure MySQL managed database service. Note: | ||
* required username <code>myroot@db-1-rw-euw1-sandbox</code> | * required username <code>myroot@db-1-rw-euw1-sandbox</code> | ||
Line 12: | Line 14: | ||
** <code>db-1-rw-euw1-sandbox</code> is mysql database server name | ** <code>db-1-rw-euw1-sandbox</code> is mysql database server name | ||
<source lang="bash"> | <source lang="bash"> | ||
mysql - | mysql --host <fully qualified server name> --user <server admin login name>@<server name> -p | ||
mysql --host db-1-rw-euw1-sandbox.mysql.database.azure.com -u myroot@db-1-rw-euw1-sandbox -pPass123% | |||
</source> | </source> | ||
Line 32: | Line 35: | ||
</source> | </source> | ||
= Connection details = | == Connection details == | ||
<source lang="bash"> | <source lang="bash"> | ||
mysql> status; | mysql> status; | ||
Line 56: | Line 59: | ||
Threads: 9 Questions: 8566 Slow queries: 0 Opens: 119 Flush tables: 1 Open tables: 112 Queries per second avg: 0.289 | Threads: 9 Questions: 8566 Slow queries: 0 Opens: 119 Flush tables: 1 Open tables: 112 Queries per second avg: 0.289 | ||
</source> | |||
Connection details: | |||
<source lang="bash"> | |||
show status like '%onn%'; | |||
</source> | </source> |
Latest revision as of 14:35, 12 December 2018
Azure constantly improves databases offering on its cloud platform. So, things here can quickly get outdated.
SQL Servers and SQL databases
These are Microsoft SQL server implementations
Azure Database MySQL servers
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. Virtual network rules are based on Virtual Network service endpoints.
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 inSELECT User FROM mysql.user;
db-1-rw-euw1-sandbox
is mysql database server name
mysql --host <fully qualified server name> --user <server admin login name>@<server name> -p mysql --host 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)
Connection details
mysql> status; -------------- mysql Ver 14.14 Distrib 5.7.24, for Linux (x86_64) using EditLine wrapper Connection id: 64986 Current database: Current user: myroot@10.10.1.4 SSL: Cipher in use is AES256-SHA Current pager: stdout Using outfile: '' Using delimiter: ; Server version: 5.6.39.0 MySQL Community Server (GPL) Protocol version: 10 Connection: db-1-rw-euw1-sandbox.mysql.database.azure.com via TCP/IP Server characterset: latin1 Db characterset: latin1 Client characterset: utf8 Conn. characterset: utf8 TCP port: 3306 Uptime: 8 hours 13 min 31 sec Threads: 9 Questions: 8566 Slow queries: 0 Opens: 119 Flush tables: 1 Open tables: 112 Queries per second avg: 0.289
Connection details:
show status like '%onn%';