Server & clients
Run the standalone server and connect over the MySQL wire protocol.
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 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='your-strong-password'
./cobaltdb-server -mysql-addr 127.0.0.1:3307 -data ./data
# Connect in another terminal
mysql -h 127.0.0.1 -P 3307 -u admin -pThis example uses a POSIX shell. In PowerShell, set the password with $env:COBALTDB_ADMIN_PASSWORD = 'your-strong-password' before starting the server. On Windows the binary is cobaltdb-server.exe.
Connect from Go
The upstream compatibility suite covers the Go MySQL driver for ping, text queries and prepared statements. Use the driver’s 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"
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 tested surface includes handshakes, text queries, result sets, error responses and parameterized prepared statements. CobaltDB does not promise the full behavior of a MySQL server.
Read the current compatibility matrix for verified operations, metadata limitations and unlisted behavior.
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.