Klustron(原KunlunBase) 对当前主流编程语言的 MySQL connector 汇总
Klustron(原KunlunBase) 对当前主流编程语言的 MySQL connector 汇总
得益于 Klustron 对PostgreSQL和MySQL连接协议和SQL语法的完整的兼容性,Klustron支持所有常见编程语言的PostgreSQL 客户端连接库(connector)的所有版本。同时 Klustron 支持常用编程语言的绝大多数版本的 MySQL 客户端连接库(connector)。我们针对这些编程语言的每一个发布的MySQL connector 库的小版本都做了实际验证,针对每一种编程语言,把Klustron支持和不支持的的每一个 MySQL connector的版本号都如下列出来,并且为了读者方便,还提供这些connectors的官方下载地址。
Java
mysql connector/j
- https://dev.mysql.com/downloads/connector/j/ MySQL 官网下载。 
- https://mvnrepository.com/artifact/mysql/mysql-connector-java maven 仓库。 
根据使用的Java语言的版本的不同,即Java 8 和Java 11,Klustron支持的MySQL connector版本有所不同,详见下表。
| 使用Java8 时Klustron支持的connector 版本 | 使用Java8 Klustron不支持的版本 | 使用Java11 Klustron支持的版本 | 使用Java11 Klustron不支持的版本 | 
|---|---|---|---|
| 5.1.4 - 5.1.8 | 5.1.9 | 8.0.11 - 8.0.29 | /(表示 无,下同) | 
| 5.1.10 - 5.1.49 | / | / | / | 
| 8.0.11 - 8.0.29 | / | / | / | 
maria-connector-java
Klustron支持 MariaDB connector/j - 3.x 所有版本,推荐用户使用这些新版本的MariaDB connector。如果要使用mariadb connector/j - 2.x 版本,必须使用在泽拓官网 下载的版本,我们对这些老版本略作修改以便适应Klustron。
mariadb connector/j - 3.x 版本
- https://mariadb.org/connector-java/all-releases/ mariadb 官网,官网只有最新的 3.x 版本。 
- https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client maven 仓库。 
mariadb connector/j - 2.x 版本
- http://zettatech.tpddns.cn:14000/thirdparty/ 泽拓科技官方下载站点。
python
可以使用下列两种Python语言的MySQL连接库来连接Klustron数据库集群。
mysql-connector/python
- 通过 pip 安装 8.x 版本 mysql connector/python : pip install mysql-connector-python 
- https://github.com/mysql/mysql-connector-python 通过 setup.py build. 
Klustron数据库除 8.0.17 版本的 mysql-connector/python 不支持,其它 8.X 版本的 mysql-connector/python 和最新的 pymysql 是支持的。
pymysql
- 通过 pip 安装 : pip install pymysql
- https://github.com/PyMySQL/PyMySQL 通过 setup.py build.
C++
mysql-connector/c++
- sudo apt-get install libmysqlclient-dev 安装 c++ 连接 mysql 的依赖。 
- https://downloads.mysql.com/archives/c-cpp/ mysql 官方 connector 下载。 
Klustron数据库当前支持 8.0.11-8.0.30 版本的connector库。
C sharp
mysql-connector/net
- mysql 
- dotnet add package MySql.Data -v $VERSION 
| 当前支持的版本 | 当前不支持的版本 | 
|---|---|
| 8.0.13 – 8.0.30 | / | 
NodeJs
- npm view mysql@$VERSION 可以通过这个命令查看现所有的 mysql connector 的版本 
- npm install mysql@VERSION 这个命令用来安装指定版本的 mysql connector 
- npm install mysql 安装最新的 connector. 
| 当前支持的版本 | 当前不支持的版本 | 
|---|---|
| mysql@2.1.1 – mysql@2.18.1 | mysql@0.1.0 – mysql@2.1.0 | 
C
libmysql++-dev
成功的版本: 
可以通过 sudo apt-cache madison libmysql++-dev 或者 apt-show-versions libmysql++-dev 查看当前安装的版本。
PHP
Mysqli
- 当前所有的 php7 的 mysqli 版本,Klustron都支持。 
- 直到最新的 php-8.1.9 的 mysqli 版本,Klustron都支持。 
GO
go-sql-driver/mysql
| 支持的版本 | 不支持的版本 | 
|---|---|
| 1.6.0 | 1.3.0 | 
| 1.5.0 | 1.3 | 
| 1.4.1 | 1.2.0 | 
| 1.4.0 | 1.2 | 
| / | 1.1.0 | 
| / | 1.1 | 
| / | 1.0.3 | 
| / | 1.0.2 | 
| / | 1.0.1 | 
| / | 1.0.0 | 
| / | 1.0 | 
- 可以通过 go get mysql@v1.5.0 下载 1.5.0 版本 
- go get 不支持的版本后会自动 go removed github.com/jmoiron/sqlx, 随后的 go build 会自动下载最新的 1.6.0 版本,故无法测试到不支持的版本。 
- 当前使用的 GoLang 版本号为 1.17. 
RUST
mysql
当前已验证Klustron支持的版本:
| 22.2.0 | 22.1.0 | 22.0.0 | 20.1.0 | 20.0.1 | 20.0.0 | 
|---|---|---|---|---|---|
| 19.0.1 | 19.0.0 | 18.2.0 | 18.1.0 | 18.0.0 | / | 
