LogoLogo
DoltHubBlogDiscordGitHubDolt
  • Introduction
    • What Is Dolt?
    • Installation
      • Linux
      • Windows
      • Mac
      • Build from Source
      • Application Server
      • Docker
      • Upgrading
    • Getting Started
      • Version Controlled Database
      • Git For Data
      • Versioned MySQL Replica
    • Use Cases
      • Data Sharing
      • Data and Model Quality Control
      • Manual Data Curation
      • Version Control for your Application
      • Versioned MySQL Replica
      • Audit
      • Configuration Management
      • Offline First
  • Concepts
    • Dolt
      • Git
        • Commits
        • Log
        • Diff
        • Branch
        • Merge
        • Conflicts
        • Remotes
        • Working Set
      • SQL
        • Databases
        • Schema
        • Tables
        • Primary Keys
        • Types
        • Indexes
        • Views
        • Constraints
        • Triggers
        • Procedures
        • Users/Grants
        • Transactions
        • System Variables
      • RDBMS
        • Server
        • Backups
        • Replication
    • DoltHub/DoltLab
      • Permissions
      • Pull Requests
      • Issues
      • Forks
  • SQL Reference
    • Running the Server
      • Configuration
      • Access Management
      • Branch Permissions
      • Backups
      • Garbage Collection
      • Metrics
      • Replication
      • Troubleshooting
    • Version Control Features
      • Using Branches
      • Merges
      • Querying History
      • Using Remotes
      • Procedures
      • Functions
      • System Tables
      • System Variables
      • Saved Queries
    • SQL Language Support
      • Data Description
      • Expressions, Functions, Operators
      • Supported Statements
      • MySQL Information Schema
      • Collations and Character Sets
      • System Variables
      • Miscellaneous
    • Supported Clients
      • Programmatic
      • SQL Editors
    • Benchmarks and Metrics
      • Correctness
      • Latency
      • Import
  • CLI Reference
    • Commands
    • Git Comparison
  • Architecture
    • Overview
    • Storage Engine
      • Commit Graph
      • Prolly Trees
      • Block Store
    • SQL
      • Go MySQL Server
      • Vitess
  • Guides
    • Cheat Sheet
    • Contributing
      • dolt
      • go-mysql-server
    • MySQL to Dolt Replication
    • Importing Data
    • Integrations
  • Other
    • FAQ
    • Roadmap
    • Versioning
  • Products
    • Hosted Dolt
      • Getting Started
      • Notable Features
      • SQL Workbench
      • Cloning a Hosted Database
      • Using DoltHub as a Remote
      • Infrastructure
    • DoltHub
      • Data Sharing
      • API
        • Authentication
        • SQL
        • CSV
        • Database
        • Hooks
      • Continuous Integration
        • Getting Started
        • Workflow Reference
      • Transform File Uploads
      • Workspaces
    • DoltLab
    • Dolt Workbench
    • DoltgreSQL
Powered by GitBook
On this page
  • Python
  • mysql.connector
  • pymysql
  • SQLAlchemy
  • Node
  • Java
  • C
  • C++
  • Dotnet
  • MySQL.Data.MySqlClient
  • MySQLConnector
  • Perl
  • PHP
  • Go
  • Ruby
  • mysql2
  • ruby/mysql
  • R
  • Rust

Was this helpful?

Edit on GitHub
Export as PDF
  1. SQL Reference
  2. Supported Clients

Programmatic

PreviousSupported ClientsNextSQL Editors

Last updated 1 year ago

Was this helpful?

Dolt ships with a built in MySQL compatible server. To start the server for your Dolt database, you run dolt sql-server in the repository directory. The dolt sql-server command starts a MySQL compatible server for the Dolt database on port 3306 with no authentication. The database name is the name of the repository directory but with dashes (-) replaced with underscores (_). So dolt-test repository name would become dolt_test database name. See .

Once a server is running, any MySQL client should be able to connect to Dolt SQL Server in the exact same way it connects to a standard MySQL database. For instance, if you are running a Dolt sql-server locally, you can connect to it with the MySQL client mysql like so:

$ mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.9-Vitess 

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

We explicitly support the programmatic clients outlined in this document through integration testing. Tests are run on GitHub pull requests to Dolt in a Ubuntu environment in a Docker container. If you would like another MySQL compatible client supported and tested, .

The test code linked to below is a good way to get started connecting to a Dolt SQL server if you are not familiar how to connect to MySQL in your language of choice. The code establishes a connection, runs some simple queries, verifies the output comes back as expected, and closes the connection.

Python

mysql.connector

pymysql

SQLAlchemy

conn_string_base = "mysql+mysqlconnector://"

engine = create_engine(conn_string_base +
                       "{user}@127.0.0.1:{port}/{db}".format(user=user,
                                                             port=port,
                                                             db=db)

Node

We support the standard mysql Node library.

Java

We support the Java client distributed on the MySQL website called mysql-connector-java. For our test we use the architecture independent build.

C

C++

Dotnet

MySQL.Data.MySqlClient

MySQLConnector

Perl

PHP

Go

Ruby

mysql2

ruby/mysql

R

Rust

We currently support two native Python MySQL connectors, and . These are all native (ie. do not depend on a MySQL compiled C library) Python libraries available through pip.

We also support the library. SQLAlchemy requires a connector that is specified in the connection string. Choose one of the supported connectors listed above, and then pass that to the SQLAlchemy connection string, as in the snippet taken from the connector test below:

We support distributed by MySQL. On OSX, we tested the client distributed by brew install mysql-client. For the Ubuntu tests, we apt install -y libmysqlclient-dev. We then use pkg-config to generate the proper CFLAGS and LDFLAGS.

We support mysql-connector-cpp. Getting it to work correctly required we checkout and build using the proper flags and dependencies. This was a relatively heavy lift but you can use as an example.

We support distributed by MySQL and the asynchronous . On OSX and Ubuntu we tested the client using .

We support the package that implements for MySQL. This connector relies on .

We support the built in extension and API for connecting to MySQL.

We support the package. This is the MySQL driver for the package.

We support the native library and the native library. The package uses the MySQL C API and . Thus, we do not support mysql/ruby.

We support the legacy and newer R clients. Both implement and require either or .

There is also an open-source, third-party wrapper for working with Dolt, called . This tool is well-maintained by and provides an easy way to work with local or remote Dolt databases from within R Studio.

We support the in Rust.

mysql.connector
pymysql
Official Client documentation.
Python mysql.connector test code
Official Client documentation
Python pymysql test code
SQLAlchemy
Offical Library documentation
Python SQLAlchemy test code
In depth Dolt <> SQLAlchemy guide with Examples
Official Client documentation
Node MySQL test code
Official Client Documentation
Java mysql-connector test code
libmysqlclient
Official Client Documentation
C libmysqlclient test code
mysql-connector-cpp
our build logic
Official Client Documentation
C++ mysql-connector-cpp test code
MySQL.Data.MySqlClient
MySqlConnector
.Net core SDK
Official Client Documentation
MySql.Data test code
Official Client Documentation
MySqlConnector test code
DBD::mysql
DBI
libmysqlclient
Official Client Documentation
DBD:mysql test code
mysqli
PDO
Official mysqli Client Documentation
Official PDO Client Documentation
mysqli test code
PDO test code
go-sql-driver/mysql
database/sql
Official Client Documentation
go-sql-driver/mysql test code
ruby/mysql
mysql2
mysql/ruby
has not been ported to MySQL client version 8
Official Client Documentation
mysql2 test code
Official Client Documentation
ruby/mysql test code
RMySQL
RMariaDB
DBI
libmysqlclient
MariaDBConnector/C
RMySQL Official Client Documentation
RMYSQL test code
RMariaDB Official Client Documentation
RMariaDB test code
DoltR
EcoHealth Alliance
Getting Started with Doltr
DoltR on GitHub
mysql crate
Official Client Documentation
Rust test code
please let us know
this documentation for more configuration details