与 Azure Database for MySQL 兼容的 MySQL 驱动程序和管理工具MySQL drivers and management tools compatible with Azure Database for MySQL
备注
将要查看的是 Azure Database for MySQL 的新服务。You are viewing the new service of Azure Database for MySQL. 若要查看经典 MySQL Database for Azure 的文档,请访问此页。To view the documentation for classic MySQL Database for Azure, please visit this page.
本文介绍与 Azure Database for MySQL 兼容的驱动程序和管理工具。This article describes the drivers and management tools that are compatible with Azure Database for MySQL.
MySQL 驱动程序MySQL Drivers
Azure Database for MySQL 使用世界上最常用的 MySQL 数据库社区版。Azure Database for MySQL uses the world's most popular community edition of MySQL database. 因此,它与多种编程语言和驱动程序兼容。Therefore, it is compatible with a wide variety of programming languages and drivers. 目标是支持三个最新版本的 MySQL 驱动程序,并且与来自开源社区的创建者共同努力,不断改进 MySQL 驱动程序的功能和可用性。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. 下表提供了已测试并确认与 Azure Database for MySQL 5.6 和 5.7 兼容的驱动程序列表:A list of drivers that have been tested and found to be compatible with Azure Database for MySQL 5.6 and 5.7 is provided in the following table:
编程语言Programming Language | 驱动程序Driver | 链接Links | 兼容版本Compatible Versions | 不兼容版本Incompatible Versions | 说明Notes |
---|---|---|---|---|---|
PHPPHP | mysqli、pdo_mysql、mysqlndmysqli, pdo_mysql, mysqlnd | https://secure.php.net/downloads.php | 5.5、5.6、7.x5.5, 5.6, 7.x | 5.35.3 | 对于 PHP 7.0 与 SSL MySQLi 的连接,请在连接字符串中添加 MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT。For PHP 7.0 connection with SSL MySQLi, add MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT in the connection string. mysqli_real_connect($conn, $host, $username, $password, $db_name, 3306, NULL, MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT); PDO 设置: PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT 选项为 false。PDO set: PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT option to false. |
.NET.NET | 适用于 .NET 的异步 MySQL 连接器Async MySQL Connector for .NET | https://github.com/mysql-net/MySqlConnectorhttps://github.com/mysql-net/MySqlConnector 来自 Nuget 的安装包Installation package from Nuget |
0.27 及以上版本0.27 and after | 0.26.5 及以下版本0.26.5 and before | |
.NET.NET | MySQL 连接器/NETMySQL Connector/NET | https://github.com/mysql/mysql-connector-net | 6.6.3、7.0、8.06.6.3 ,7.0 ,8.0 | 编码错误可能会导致某些非 UTF8 Windows 系统的连接失败。An encoding bug may cause connections to fail on some non-UTF8 Windows systems. | |
Node.jsNode.js | mysqljsmysqljs | https://github.com/mysqljs/mysql/https://github.com/mysqljs/mysql/ 来自 NPM 的安装包:Installation package from NPM: 从 NPM 运行 npm install mysql Run npm install mysql from NPM |
2.152.15 | 2.14.1 及以下版本2.14.1 and before | |
Node.jsNode.js | node-mysql2node-mysql2 | https://github.com/sidorares/node-mysql2 | 1.3.4+1.3.4+ | ||
GoGo | Go MySQL 驱动程序Go MySQL Driver | https://github.com/go-sql-driver/mysql/releases | 1.3、1.41.3, 1.4 | 1.2 及以下版本1.2 and before | 在版本 1.3 的连接字符串中使用 allowNativePasswords=true 。Use allowNativePasswords=true in the connection string for version 1.3. 版本 1.4 包含修补程序,不再需要 allowNativePasswords=true 。Version 1.4 contains a fix and allowNativePasswords=true is no longer required. |
PythonPython | MySQL 连接器/PythonMySQL Connector/Python | https://pypi.python.org/pypi/mysql-connector-python | 1.2.3、2.0、2.1、2.2,将 8.0.16+ 与 MySQL 8.0 配合使用1.2.3, 2.0, 2.1, 2.2, use 8.0.16+ with MySQL 8.0 | 1.2.2 及以下版本1.2.2 and before | |
PythonPython | PyMySQLPyMySQL | https://pypi.org/project/PyMySQL/ | 0.7.11、0.8.0、0.8.1、0.9.3+0.7.11, 0.8.0, 0.8.1, 0.9.3+ | 0.9.0 - 0.9.2(web2py 中的回归)0.9.0 - 0.9.2 (regression in web2py) | |
JavaJava | MariaDB 连接器/JMariaDB Connector/J | https://downloads.mariadb.org/connector-java/ | 2.1、2.0、1.62.1, 2.0, 1.6 | 1.5.5 及以下版本1.5.5 and before | |
JavaJava | MySQL 连接器/JMySQL Connector/J | https://github.com/mysql/mysql-connector-j | 5.1.21+,将 8.0.17+ 与 MySQL 8.0 配合使用5.1.21+, use 8.0.17+ with MySQL 8.0 | 5.1.20 和更低版本5.1.20 and below | |
CC | MySQL 连接器/C (libmysqlclient)MySQL Connector/C (libmysqlclient) | https://dev.mysql.com/doc/refman/5.7/en/c-api-implementations.html | 6.0.2+6.0.2+ | ||
CC | MySQL 连接器/ODBC (myodbc)MySQL Connector/ODBC (myodbc) | https://github.com/mysql/mysql-connector-odbc | 3.51.29+3.51.29+ | ||
C++C++ | MySQL 连接器/C++MySQL Connector/C++ | https://github.com/mysql/mysql-connector-cpp | 1.1.9+1.1.9+ | 1.1.3 和更低版本1.1.3 and below | |
C++C++ | MySQL++MySQL++ | https://github.com/tangentsoft/mysqlpp | 3.2.3+3.2.3+ | ||
RubyRuby | mysql2mysql2 | https://github.com/brianmario/mysql2 | 0.4.10+0.4.10+ | ||
RR | RMySQLRMySQL | https://github.com/rstats-db/RMySQL | 0.10.16+0.10.16+ | ||
SwiftSwift | mysql-swiftmysql-swift | https://github.com/novi/mysql-swift | 0.7.2+0.7.2+ | ||
SwiftSwift | vapor/mysqlvapor/mysql | https://github.com/vapor/mysql-kit | 2.0.1+2.0.1+ |
管理工具Management Tools
兼容性优势也适用于数据库管理工具。The compatibility advantage extends to database management tools as well. 只要数据库操作在用户权限范围内,现有工具应继续与 Azure Database for MySQL 配合使用。Your existing tools should continue to work with Azure Database for MySQL, as long as the database manipulation operates within the confines of user permissions. 下表列出了已测试并确认与 Azure Database for MySQL 5.6 和 5.7 兼容的三种常用数据库管理工具:Three common database management tools that have been tested and found to be compatible with Azure Database for MySQL 5.6 and 5.7 are listed in the following table:
MySQL Workbench 6.x 及以上版本MySQL Workbench 6.x and up | Navicat 12Navicat 12 | PHPMyAdmin 4.x 及以上版本PHPMyAdmin 4.x and up | |
---|---|---|---|
创建、更新、读取、写入、删除Create, Update, Read, Write, Delete | XX | XX | XX |
SSL 连接SSL Connection | XX | XX | XX |
SQL 查询自动完成SQL Query Auto Completion | XX | XX | |
导入和导出数据Import and Export Data | XX | XX | XX |
导出为多种格式Export to Multiple Formats | XX | XX | XX |
备份和还原Backup and Restore | XX | ||
显示服务器参数Display Server Parameters | XX | XX | XX |
显示客户端连接Display Client Connections | XX | XX | XX |