DEV Community

Matheus Gomes 👨‍💻
Matheus Gomes 👨‍💻

Posted on

Easy fix for a simple problem

Introducion 💻

Hi, I'm writing this after almost 30 minutes looking into this problems, just to know it was an easy fix.

So... Let's go!

The problem 💾

The problem was when learning about creating a back-end server, at some point it says to create a new database with the name that you used in the orm. The command used in the video to create was createdb server_name, but it gave a problem about password in my windows 10 machine.

The problema was the following:

createdb testdatabase 

createdb: error: connection to server at "localhost" (::1), port 5432 failed:
FATAL:  password authentication failed for user "<username_placeholder>"
Enter fullscreen mode Exit fullscreen mode

So after around 30 minutes investigating I discovered that was symply about the command used.

The right command is the following:

createdb -U postgres testdatabase
Enter fullscreen mode Exit fullscreen mode

Hope it answer your search to solve it. Also, hope you don't lost 30 minutes searching!

See ya!

Top comments (1)

cjsmocjsmo profile image
Charlie J Smotherman

manpage is your friend 👍