Postgres password

I try to learn more about XojoWeb App with Postgres Database. I run the sample project from Xojo. There is something I don’t understand: Why can I connect to with any password? Where and how can I set a password to protect my database?

mDb = New PostgreSQLDatabase

mDb.Host = "localhost"
mDb.UserName = "postgres"
mDb.Password = "WWpassword"
mDb.AppName = App.ExecutableFile.Name
mDb.DatabaseName = "postgres"

Catch err As DatabaseException
  mIsConnected = False
  ConnectStatusLabel.Text = "Error connecting to PostgreSQL: " + err.Message
End Try

mIsConnected = True
ConnectStatusLabel.Text = "Connected to PostgreSQL!"

there are configuration files for a postgres server
look at postgres.conf and pg_hba.conf
by default only the postgres server device can access the database.

1 Like