MySQL Driver v0.1.0

Driver Version v0.1.0 Tested With MySQL 9.4

This driver provides access to MySQL , a free and open-source relational database management system.

Installation

The MySQL driver can be installed with dbc :

dbc install mysql

Connecting

To connect, edit the uri option below to match your environment and run the following:

from adbc_driver_manager import dbapi

conn = dbapi.connect(
  driver="mysql",
  db_kwargs = {
    "uri": "root@tcp(localhost:3306)/demo"
  }
)

Note: The example above is for Python using the adbc-driver-manager package but the process will be similar for other driver managers.

Feature & Type Support

Feature Support
Bulk Ingestion Create
Append
Create/Append
Replace
Temporary Table
Specify target catalog
Specify target schema
Non-nullable fields are marked NOT NULL
Catalog (GetObjects) depth=catalogs
depth=db_schemas
depth=tables
depth=columns (all)
Get Parameter Schema
Get Table Schema
Prepared Statements
Transactions

Types

MySQL to Arrow

SQL Type

Arrow Type

BIGINT

int64

BOOLEAN

int64, int8 ⚠️ [1]

DATE

date32[day]

DATETIME

timestamp[us]

DOUBLE PRECISION

double

INT

int32

NUMERIC

decimal64(10, 2)

REAL

SMALLINT

int16

TIME

time64[us]

TIMESTAMP

timestamp[us]

VARBINARY

binary

VARCHAR

string

Arrow to MySQL

Arrow Type MySQL Type
Bind Ingest
binary VARBINARY
bool BOOLEAN
date32[day] DATE
decimal128 DECIMAL
double DOUBLE PRECISION
float
int16 SMALLINT
int32 INT
int64 BIGINT
string VARCHAR
time64[us] TIME
timestamp[us, tz=UTC] TIMESTAMP
timestamp[us] DATETIME