#How do I change the database name from `test`?

5 messages · Page 1 of 1 (latest)

sleek zealot
#

I've discovered that Payload uses the name test for its database. How do I change that? It's a strange default and it's bugging me that it's called test.

native patioBOT
sleek zealot
#

Nevermind, figured it out.

#

MongoDB will use the name test as the DB name unless you specify a name in your DATABASE_URI setting in your .env file. The correct format is like so:

#

DATABASE_URI=mongodb+srv://<username>:<password>@your-cluster-name.abcdefg.mongodb.net/<your-db-name-here>