How to Create the Initial Postgresql Database?
1 min read
postgresql
How to Install PostgreSQL
You can use brew to install PostgreSQL:
$ brew install postgresqlStart the process
You can use brew services to manage your processes like this:
$ brew services start postgresqlCreate the initial database
If you try starting the PostgreSQL console (using psql) and get the following error:
psql: error: could not connect to server: FATAL: database "user" does not existthen you need to create the initial database using:
$ createdbIf your next step is wiring Rails to read replicas or legacy sources, I covered that in How to connect to multiple databases in Ruby on Rails 7.
Share this article:
