Drizzle TeamDT
Drizzle Team3y ago
11 replies
oscklm

Error: Either `connectionString` or `host, port, etc.` params be provided in config file

Hey,

So i'm trying to setup Drizzle with PlanetScale, and want to use the drizzle kit push command, but i run into this error:

 throw Error(
              ^

Error: Either `connectionString` or `host, port, etc.` params be provided in config file
    at connectToMySQL (/Users/oscar/Projects/popfeed/node_modules/drizzle-kit/index.js:45561:15)
    at Command2.<anonymous> (/Users/oscar/Projects/popfeed/node_modules/drizzle-kit/index.js:51266:28)
    at Command2.listener [as _actionHandler] (/Users/oscar/Projects/popfeed/node_modules/drizzle-kit/index.js:832:21)
    at /Users/oscar/Projects/popfeed/node_modules/drizzle-kit/index.js:1251:69
    at Command2._chainOrCall (/Users/oscar/Projects/popfeed/node_modules/drizzle-kit/index.js:1183:16)
    at Command2._parseCommand (/Users/oscar/Projects/popfeed/node_modules/drizzle-kit/index.js:1251:31)
    at /Users/oscar/Projects/popfeed/node_modules/drizzle-kit/index.js:1120:31
    at Command2._chainOrCall (/Users/oscar/Projects/popfeed/node_modules/drizzle-kit/index.js:1183:16)
    at Command2._dispatchSubcommand (/Users/oscar/Projects/popfeed/node_modules/drizzle-kit/index.js:1116:27)
    at Command2._parseCommand (/Users/oscar/Projects/popfeed/node_modules/drizzle-kit/index.js:1222:23)


Config
import type { Config } from 'drizzle-kit';

export default {
    schema: './src/lib/db/schema.ts',
    out: './src/lib/db/migrations',
    connectionString: process.env['DATABASE_URL']
} satisfies Config;


I'm using a connectionString that is formatted like this in my .env:
DATABASE_URL='mysql://USERNAME:PASSWORD@aws.connect.psdb.cloud/popfeed?sslaccept=strict'

Everything i can google my way to, do it the same way, and i really can't seem to figure out what i'm doing wrong here?

Anyone that can point me in the right direction
Was this page helpful?