Answer the question
In order to leave comments, you need to log in
Can't connect to PostgreSql via GORM in Golang. What can be wrong?
What could be the reason that there is no access to the PostgreSQL database through GORM, but there is in PgAdmin. The settings are the same. Antivirus, firewall turned off. GORM pumped over a new one.
import(
//"github.com/jinzhu/gorm/dialects/postgres"
"github.com/jinzhu/gorm"
_ "github.com/lib/pq"
)
db, err := gorm.Open("postgres", "host=localhost:5432 user=postgres password=RomanRakzin dbname=MyDB sslmode=disable")
if err != nil {
log.Println("Ошибка подключения к базе данных......")
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question