Getting startedInstall CobaltDB and run your first SQL query in Go.SQL & JSONTables, indexes, parameterized queries, JSON and transactions.ArchitectureExplore disk-paged B+trees, bounded memory and crash recovery.Server & clientsConnect MySQL 8.4 clients and ORMs to the standalone server.Production guidePlan TLS, security, backups, observability and deployment boundaries.Performance benchmarksPaged storage, memory measurements and benchmark methodology.FeaturesSQL, transactions, encryption and a pure Go runtime.Brand assetsDownload the CobaltDB SVG logo and icon.
K to open ESC to close
Documentation

Server & clients

Connect MySQL 8.4 clients and ORMs to the standalone server.

Build & start locally

Build the standalone server from the repository, bind the MySQL listener to loopback, and set your own admin password.

Local server workflowbash
# Build the server from source
git clone --branch v0.7.0 --depth 1 https://github.com/cobaltdb/cobaltdb.git
cd cobaltdb
go build -o cobaltdb-server ./cmd/cobaltdb-server

# Local development: choose a strong admin password
export COBALTDB_ADMIN_PASSWORD='Choose-A-Strong-Password-1!'
./cobaltdb-server -mysql-addr 127.0.0.1:3307 -data ./data -multi-database

# Connect in another terminal
mysql -h 127.0.0.1 -P 3307 -u admin -p

The -multi-database flag keeps application databases separate. After connecting, create the database used below:

Application databaseSQL
CREATE DATABASE IF NOT EXISTS app;
USE app;

This example uses a POSIX shell. In PowerShell, set the password with $env:COBALTDB_ADMIN_PASSWORD = 'Choose-A-Strong-Password-1!' before starting the server. On Windows the binary is cobaltdb-server.exe.

Connect from Go

The upstream release tests MySQL clients and multiple drivers and ORMs. This example uses Go’s MySQL driver and its configuration API to keep credentials out of connection-string concatenation.

MySQL driver configurationGo
import (
    "database/sql"
    "os"
    "github.com/go-sql-driver/mysql"
)

cfg := mysql.NewConfig()
cfg.User = "admin"
cfg.Passwd = os.Getenv("COBALTDB_ADMIN_PASSWORD")
cfg.Net = "tcp"
cfg.Addr = "127.0.0.1:3307"
cfg.DBName = "app"

db, err := sql.Open("mysql", cfg.FormatDSN())
if err != nil { log.Fatal(err) }
defer db.Close()
if err := db.PingContext(ctx); err != nil { log.Fatal(err) }

This configuration fragment belongs inside your Go application; install github.com/go-sql-driver/mysql and add your application’s context and logging imports.

Compatibility, explicitly

The server identifies as 8.4.6-CobaltDB. Tests compare SQL results, types, warnings and errors with MySQL 8.4. Coverage includes TLS, caching_sha2_password, prepared statements, cursors, multiple result sets, LOAD DATA LOCAL and mysqldump round trips.

Tested clients and ORMs. Upstream coverage includes go-sql-driver, Sequelize, Prisma, TypeORM, Django, SQLAlchemy, Laravel, Rails, Doctrine, Hibernate, Connector/J and EF Core. Application installs include WordPress, Nextcloud, Gitea and Keycloak. Validate your own versions, configuration and workload.

Read the current compatibility matrix for verified operations and known differences. Isolation is read committed by default; replication uses CobaltDB’s protocol, not MySQL binlogs or GTIDs.

Beyond local development

Keep listeners private and configure TLS for non-loopback access. Review server flags with ./cobaltdb-server -help, then follow the production guide and upstream operational runbook.

Source-aligned guide · CobaltDB v0.7.0Suggest an improvement