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.
# 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 -pThe -multi-database flag keeps application databases separate. After connecting, create the database used below:
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.
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.
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.