Configure PostgreSQL?

Windows - 10 Education
OpenServer - 5.6
PhP 7.1
Apache - PhP 7
PostgreSQL - 9.6
Laravel - 5.3

Supply OEM, ODM Service PostgreSQL 9.6.
Created a test website, clean blog Laravel 5.4.
Created a blog table, plugged in .env configured.
@if(DB::connection()->getDatabaseName())
<hr>
 <h1>Connected successfully to database {{ DB::connection()->getDatabaseName() }} !</h1>
<hr>
 @Endiff 
// logs that the connection works and the DB name.

Create your project, make the same settings
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1 // here I have tried localhost
DB_PORT=3306 // here I am me too on 5432
DB_DATABASE=market // even if the return to database 'blog' which is working on another site 
DB_USERNAME=postgres
DB_PASSWORD=adminer

Emboss an error:
QueryException in Connection.php line 770:
SQLSTATE[08006] [7] could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 3306?


- PHP 7.1 - php.ini
extension=php_pdo_pgsql.dll
extension=php_pgsql.dll

[PostgreSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0

Configuring the PosgreSQL 9.6:
# TYPE DATABASE USER ADDRESS METHOD

# IPv4 local connections:
host all all 0.0.0.0/0 trust
// tried here to register ADDRESS * or ::1/* or ::1/localhost or ::1/127.0.01
# IPv6 local connections:
#host all all ::1/128 trust
# Allow replication connections from localhost, by a user with the
# replication privilege.
#host replication postgres 127.0.0.1/32 trust
#host replication postgres ::1/128 trust
// same here tried to create a profile which sit in OS user_name 127.0.0.1/32 trust...


Checked port settings in the connected PostgreSQL = 5432
In the database table there, but alas, on the second and other sites, the connection doesn't allow the connection.
Also, if you register in shell: psql. Beat out that this user is not in the database, created a user via PhpPgAdmin with root access. Typing the same command in was to knock out that there is no database for that user, created a database, assigned a user, called a user name, to no avail.

What am I doing wrong? Where is the error and how to fix it?

Appendix 1:
Got all the DB connection with such configs:
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=market
DB_USERNAME=postgres
DB_PASSWORD=adminer

//this error when trying php artisan migrate

[PDOException]
 SQLSTATE[08006] [7] could not connect to server: Connection refused (0x0000274D/100
61)
 Is the server running on host "127.0.0.1" and accepting

 TCP/IP connections on port 3306?

// changed the port in the DB_PORT=5432
// php artisan migrate error

[Illuminate\Database\QueryException]
 SQLSTATE[08006] [7] FATAL: database "market" does not exist (SQL: select * from in
 formation_schema.tables where table_schema = public and table_name = migrations)



[PDOException]
 SQLSTATE[08006] [7] FATAL: database "market" does not exist

Although the database market is, and we already have a connection to it.
// returns the name of the database market
 DB::connection()->getDatabaseName() 
// using tinker
>>> DB::connection()->getDatabaseName();
=> "market"
August 19th 19 at 22:50
1 answer
August 19th 19 at 22:52
Solution
In connection with unusual interfaces, there was a confusion.
The solution found.
We had to climb to a higher level, and create out a table.
The hierarchy is as follows:
server ( Servers )
- DBMS ( PostgreSQL )
Database
Schema
Table
I don't know what schema, etc., has risen to a higher level and made the database, it worked -_ -

p.s. thought the schema is the database, then happened to notice when digging in config PhpPgAdmin.

Find more questions by tags PostgreSQL