Skip to content

MySQL

Drizby supports multiple MySQL providers.

The standard MySQL driver for Node.js.

Connection string:

mysql://user:password@host:3306/database
FieldExample
Userroot
Passwordsecret
Hostlocalhost
Port3306
Databasemydb

For PlanetScale serverless MySQL. Uses structured connection fields.

FieldRequiredExample
HostYesaws.connect.psdb.cloud
UsernameYesyour_username
PasswordYespscale_pw_...

Get your credentials from the PlanetScale dashboard.

For TiDB Cloud serverless — a MySQL-compatible distributed database.

Connection string:

mysql://user:password@gateway01.us-east-1.prod.aws.tidbcloud.com:4000/database?ssl={}

MySQL schemas use mysqlTable and column types from drizzle-orm/mysql-core:

import { mysqlTable, serial, varchar, int, timestamp, double } from 'drizzle-orm/mysql-core'
export const products = mysqlTable('products', {
id: serial('id').primaryKey(),
name: varchar('name', { length: 255 }).notNull(),
price: double('price'),
stock: int('stock'),
createdAt: timestamp('created_at').defaultNow()
})