Share via


Connect and query overview for Azure database for MySQL- Single Server

APPLIES TO: Azure Database for MySQL - Single Server

Important

Azure Database for MySQL single server is on the retirement path. We strongly recommend that you upgrade to Azure Database for MySQL flexible server. For more information about migrating to Azure Database for MySQL flexible server, see What's happening to Azure Database for MySQL Single Server?

The following document includes links to examples showing how to connect and query with Azure Database for MySQL single server. This guide also includes TLS recommendations and libraries that you can use to connect to the server in supported languages below.

Quickstarts

Quickstart Description
MySQL workbench This quickstart demonstrates how to use MySQL Workbench Client to connect to a database. You can then use MySQL statements to query, insert, update, and delete data in the database.
Azure Cloud Shell This article shows how to run mysql.exe in Azure Cloud Shell to connect to your server and then run statements to query, insert, update, and delete data in the database.
MySQL with Visual Studio You can use MySQL for Visual Studio for connecting to your MySQL server. MySQL for Visual Studio integrates directly into Server Explorer making it easy to setup new connections and working with database objects.
PHP This quickstart demonstrates how to use PHP to create a program to connect to a database and use MySQL statements to query data.
Java This quickstart demonstrates how to use Java to connect to a database and then use MySQL statements to query data.
Node.js This quickstart demonstrates how to use Node.js to create a program to connect to a database and use MySQL statements to query data.
.NET(C#) This quickstart demonstrates how to use.NET (C#) to create a C# program to connect to a database and use MySQL statements to query data.
Go This quickstart demonstrates how to use Go to connect to a database. Transact-SQL statements to query and modify data are also demonstrated.
Python This quickstart demonstrates how to use Python to connect to a database and use MySQL statements to query data.
Ruby This quickstart demonstrates how to use Ruby to create a program to connect to a database and use MySQL statements to query data.
C++ This quickstart demonstrates how to use C++ to create a program to connect to a database and use query data.

TLS considerations for database connectivity

Transport Layer Security (TLS) is used by all drivers that Microsoft supplies or supports for connecting to databases in Azure Database for MySQL. No special configuration is necessary but do enforce TLS 1.2 for newly created servers. We recommend if you are using TLS 1.0 and 1.1, then you update the TLS version for your servers. See How to configure TLS

Libraries

Azure Database for MySQL uses the world's most popular community edition of MySQL database. Hence, it is compatible with a wide variety of programming languages and drivers. The goal is to support the three most recent versions MySQL drivers, and efforts with authors from the open source community to constantly improve the functionality and usability of MySQL drivers continue.

See what drivers are compatible with Azure Database for MySQL single server.

Next steps