Error: Role "root" does not exist

Hi, I am trying to set up a project with Drizzle Studio but when I try to start the db with Podman (podman compose up --detach && drizzle-kit push) an Error occurs: PostgresError: role "root" does not exist. .env: DATABASE_URL="postgres://root:mysecretpassword@localhost:5432/local"
Drizzle Studio is up and running on https://local.drizzle.studio
PostgresError: role "root" does not exist
at ErrorResponse (/Users/i589824/Documents/CineHub/node_modules/drizzle-kit/bin.cjs:79677:27)
at handle (/Users/i589824/Documents/CineHub/node_modules/drizzle-kit/bin.cjs:79454:7)
at Socket.data (/Users/i589824/Documents/CineHub/node_modules/drizzle-kit/bin.cjs:79277:9)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:368:12)
at readableAddChunk (node:internal/streams/readable:341:9)
at Readable.push (node:internal/streams/readable:278:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
at TCP.callbackTrampoline (node:internal/async_hooks:128:17) {
severity_local: 'FATAL',
severity: 'FATAL',
code: '28000',
file: 'miscinit.c',
line: '752',
routine: 'InitializeSessionUserId'
}
Drizzle Studio is up and running on https://local.drizzle.studio
PostgresError: role "root" does not exist
at ErrorResponse (/Users/i589824/Documents/CineHub/node_modules/drizzle-kit/bin.cjs:79677:27)
at handle (/Users/i589824/Documents/CineHub/node_modules/drizzle-kit/bin.cjs:79454:7)
at Socket.data (/Users/i589824/Documents/CineHub/node_modules/drizzle-kit/bin.cjs:79277:9)
at Socket.emit (node:events:517:28)
at addChunk (node:internal/streams/readable:368:12)
at readableAddChunk (node:internal/streams/readable:341:9)
at Readable.push (node:internal/streams/readable:278:10)
at TCP.onStreamRead (node:internal/stream_base_commons:190:23)
at TCP.callbackTrampoline (node:internal/async_hooks:128:17) {
severity_local: 'FATAL',
severity: 'FATAL',
code: '28000',
file: 'miscinit.c',
line: '752',
routine: 'InitializeSessionUserId'
}
1 Reply
TOSL
TOSL5d ago
So root is your user. In, MySQL that would the default but for postgres it should just be postgres. postgres://<user>:<password>@<host>:<port>/<database> If you want to change your user, you'll need run some SQL to create it. But I'll let you search for that.

Did you find this page helpful?