TiDB中文技术文档odbc、java(jdbc)、 Perl、Python、PHP、Ruby 和 C。 TiDB 兼容 MySQL(5.6、5.7) 的所有连接器和 API,包括: MySQL Connector/C MySQL Connector/C++ MySQL Connector/J MySQL Connector/Net MySQL Connector/ODBC MySQL Connector/Python MySQL C API API MySQL PHP API MySQL Perl API MySQL Python API MySQL Ruby APIs MySQL Tcl API MySQL Eiffel Wrapper Mysql Go API Oracle 官方提供了以下 API , TiDB 可以兼容所有这些 API。 MySQL Connector/C:C 语言的客户端库,是 libmysqlclient 的替代品 2012,2013,2015和2017版本 MySQL Connector/ODBC:标准的 ODBC 接口,支持 Windows,Unix 和 OS X MySQL Connector/Python:Python 语言的客户端包,和 Python DB API version 2.0 一致 如果使用 C 语言程序直接连接 TiDB,可以直接链接 libmysqlclient 库,使用 MySQL 的 C API,这是最主0 码力 | 444 页 | 4.89 MB | 6 月前3
TiDB v6.1 DocumentationTiDB and Java · · · · · · · · · · · · · · · · · · · 195 4.3.4 Build a Simple CRUD App with TiDB and Python · · · · · · · · · · · · · · · · · 234 4.4 Connect to TiDB · · · · · · · · · · · · · · · · · · · CRUD App with TiDB and Python This document describes how to use TiDB and Python to build a simple CRUD appli- cation. Note: It is recommended to use Python 3.10 or a later Python version. 4.3.4.1 Step Get the code git clone https://github.com/pingcap-inc/tidb-example-python.git SQLAlchemy is a popular open-source ORM library for Python. The following uses SQLAlchemy 1.44 as an example. import uuid from0 码力 | 4487 页 | 84.44 MB | 1 年前3
TiDB v5.2 中文手册列值全 部为 0,代表调度成功。 也可以通过 table-regions.py 脚本,查看 Region 的分布。目前分布已经比较均匀了: [root@172.16.4.4 scripts]# python table-regions.py --host 172.16.4.3 --port 31453 test test_ �→ hotspot [RECORD - test.test_hotspot] %7Binstancexxxxxxxxx20181%22%7D)%20by%20(instance)&start �→ =1565879269&end=1565882869&step=30' |python -m json.tool { "data": { "result": [ { "metric": { "instance": "xxxxxxxxxx:20181" }, "values": Region/Peer/Raft Group 576 • Region Split • Scheduler • Store 注意: 本文内容基于 TiDB 3.0 版本,更早的版本 (2.x) 缺少部分功能的支持,但是基本原理类似,也可 以以本文作为参考。 10.5.6.1 PD 调度原理 该部分介绍调度系统涉及到的相关原理和流程。 10.5.6.1.1 调度流程 宏观上来看,调度流程大体可划分为0 码力 | 2259 页 | 48.16 MB | 1 年前3
TiDB v5.1 中文手册列值全 部为 0,代表调度成功。 也可以通过 table-regions.py 脚本,查看 Region 的分布。目前分布已经比较均匀了: [root@172.16.4.4 scripts]# python table-regions.py --host 172.16.4.3 --port 31453 test test_ �→ hotspot [RECORD - test.test_hotspot] %7Binstancexxxxxxxxx20181%22%7D)%20by%20(instance)&start �→ =1565879269&end=1565882869&step=30' |python -m json.tool { "data": { "result": [ { "metric": { "instance": "xxxxxxxxxx:20181" }, "values": • Region/Peer/Raft Group 555 • Region Split • Scheduler • Store 注意: 本文内容基于 TiDB 3.0 版本,更早的版本(2.x)缺少部分功能的支持,但是基本原理类似,也 可以以本文作为参考。 10.4.6.1 PD 调度原理 该部分介绍调度系统涉及到的相关原理和流程。 10.4.6.1.1 调度流程 宏观上来看,调度流程大体可划分为0 码力 | 2189 页 | 47.96 MB | 1 年前3
TiDB v5.1 Documentationtable-regions.py script. Currently, the Region distribution is relatively even: [root@172.16.4.4 scripts]# python table-regions.py --host 172.16.4.3 --port �→ 31453 test test_hotspot [RECORD - test.test_hotspot] �→ Binstancexxxxxxxxx20181%22%7D)%20by%20(instance)&start=1565879269&end �→ =1565882869&step=30' |python -m json.tool { "data": { 730 "result": [ { "metric": { "instance": "xxxxxxxxxx:20181" }, document initially targets TiDB 3.0. Although some features are not supported in earlier versions (2.x), the underlying mechanisms are similar and this document can still be used as a reference. 10.4.60 码力 | 2745 页 | 47.65 MB | 1 年前3
TiDB v6.1 中文手册· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 185 4.3.5 TiDB 和 Python 的简单 CRUD 应用程序 · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 202 该环境会自动克隆代码,并通过 TiUP 部署测试集群。 4.3.4.2 第 2 步:安装 Python 请在你的计算机上下载并安装 Python。本文的示例使用 Django 3.2.16 版本。根据 Django 文档,Django 3.2.16 版本 支持 Python 3.6、3.7、3.8、3.9 和 3.10 版本,推荐使用 Python 3.10 版本。 4.3.4.3 第 3 步:获取应用程序代码 建议: 赖 空白程序(可选)一节。 请下载或克隆示例代码库 pingcap-inc/tidb-example-python,并进入到目录 django_example 中。 4.3.4.4 第 4 步:运行应用程序 接下来运行应用程序代码,将会生成一个 Web 应用程序。你可以使用 python manage.py migrate 命令,要求 Django 在数据库 django 中创建一个表 player。如果你向应用程序的0 码力 | 3572 页 | 84.36 MB | 1 年前3
TiDB v6.5 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 162 4.3.3 Python· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · support ticket. 172 4.3.3 Python 4.3.3.1 Connect to TiDB with mysqlclient TiDB is a MySQL-compatible database, and mysqlclient is a popular open-source driver for Python. In this tutorial, you can Dedicated, and TiDB Self- Hosted. 4.3.3.1.1 Prerequisites To complete this tutorial, you need: • Python 3.10 or higher. • Git. • A TiDB cluster. If you don’t have a TiDB cluster, you can create one as0 码力 | 5282 页 | 99.69 MB | 1 年前3
TiDB v8.5 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 177 4.3.3 Python· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · submit a support ticket. 4.3.3 Python 4.3.3.1 Connect to TiDB with mysqlclient TiDB is a MySQL-compatible database, and mysqlclient is a popular open-source driver for Python. In this tutorial, you can Dedicated, and TiDB Self-Managed. 4.3.3.1.1 Prerequisites To complete this tutorial, you need: • Python 3.10 or higher. • Git. • A TiDB cluster. If you don’t have a TiDB cluster, you can create one as0 码力 | 6730 页 | 111.36 MB | 10 月前3
TiDB v8.4 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 172 4.3.3 Python· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · submit a support ticket. 4.3.3 Python 4.3.3.1 Connect to TiDB with mysqlclient TiDB is a MySQL-compatible database, and mysqlclient is a popular open-source driver for Python. In this tutorial, you can Dedicated, and TiDB Self-Managed. 4.3.3.1.1 Prerequisites To complete this tutorial, you need: • Python 3.10 or higher. • Git. • A TiDB cluster. If you don’t have a TiDB cluster, you can create one as0 码力 | 6705 页 | 110.86 MB | 10 月前3
TiDB v7.6 Documentation· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · 155 4.3.3 Python· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · create a support ticket. 4.3.3 Python 4.3.3.1 Connect to TiDB with mysqlclient TiDB is a MySQL-compatible database, and mysqlclient is a popular open-source driver for Python. In this tutorial, you can Dedicated, and TiDB Self- Hosted. 166 4.3.3.1.1 Prerequisites To complete this tutorial, you need: • Python 3.10 or higher. • Git. • A TiDB cluster. If you don’t have a TiDB cluster, you can create one as0 码力 | 6123 页 | 107.24 MB | 1 年前3
共 31 条
- 1
- 2
- 3
- 4













