Azure Database for MariaDB 中的 SSL 连接SSL connectivity in Azure Database for MariaDB

Azure Database for MariaDB 支持使用安全套接字层 (SSL) 将数据库服务器连接到客户端应用程序。Azure Database for MariaDB supports connecting your database server to client applications using Secure Sockets Layer (SSL). 通过在数据库服务器与客户端应用程序之间强制实施 SSL 连接,可以加密服务器与应用程序之间的数据流,有助于防止“中间人”攻击。Enforcing SSL connections between your database server and your client applications helps protect against "man in the middle" attacks by encrypting the data stream between the server and your application.

默认设置Default settings

默认情况下,应将数据库服务配置为需要 SSL 连接才可连接到 MariaDB。By default, the database service should be configured to require SSL connections when connecting to MariaDB. 建议尽量不要禁用 SSL 选项。We recommend to avoid disabling the SSL option whenever possible.

通过 Azure 门户和 CLI 预配新的 Azure Database for MariaDB 服务器时,默认情况下会强制实施 SSL 连接。When provisioning a new Azure Database for MariaDB server through the Azure portal and CLI, enforcement of SSL connections is enabled by default.

Azure 门户中显示了各种编程语言的连接字符串。Connection strings for various programming languages are shown in the Azure portal. 这些连接字符串包含连接到数据库所需的 SSL 参数。Those connection strings include the required SSL parameters to connect to your database. 在 Azure 门户中,选择服务器。In the Azure portal, select your server. 在“设置”标题下,选择“连接字符串”。Under the Settings heading, select the Connection strings. SSL 参数因连接器而异,例如“ssl=true”、“sslmode=require”或“sslmode=required”,以及其他变体。The SSL parameter varies based on the connector, for example "ssl=true" or "sslmode=require" or "sslmode=required" and other variations.

若要了解如何在开发应用程序期间启用或禁用 SSL 连接,请参阅如何配置 SSLTo learn how to enable or disable SSL connection when developing application, refer to How to configure SSL.

后续步骤Next steps