SQL Learning Path - Creating and Dropping Databases Discussion
Initially, I got a connection error, to the effect, 'database 'my_user_name' does not exist.
After running createdb
and then psql
, everything works and I was able to connect using 'TablePlus' : )
Type "psql -l" to your command to check existing databases (without quotes "")
This a good one that I run every so often to check for any old databases laying around that I can get rid of, so good call on mentioning it!
Hi mate, should probably mention somewhere to createdb. I spent a good 20 minutes trying to figure out why tablePlus couldn't connect with the new database.
I had the same connection error that Eric Halverson mentioned and my simple fix was to enter postgres
as the database name in the pop up window of tableplus when creating the connection. For the reason as to why that happens, I found this comment on reddit that explains it pretty well => https://www.reddit.com/r/PostgreSQL/comments/s0f6f3/comment/hs1hwwp/?utm_source=share&utm_medium=web2x&context=3
This worked for me. I had already set up a user when downloading postgres. Entered its name and pw in user and password in tableplus popup. In database, I had to write postgres.