PhpStorm says PostgreSQL database doesn't exist?

I can connect to the protomolecule database with these exact credentials through a PHP script. An attempt to install it in PhpStorm fails, as you can see in the picture.

If I changed the protomolecule database to the default postgres database, it communicates perfectly with PhpStorm. I can’t understand why the user can only connect to postgres and nothing else.

I tried setting up a new user and new databases to no avail.

Window Sources and Drivers PhpStorm

Edit : Added PHP script working parameters specified below, as requested.

 array( 'database' => 'protomolecule', 'driver' => 'Pgsql', 'hostname' => 'localhost', 'username' => 'postgres', 'password' => 'xxxxxxxxxxxxx', 'port' => '5432' ) 
+5
source share
2 answers

The image has a URL. It states that this "overrides the settings above." The url does not have a username and password. Can you try adding a username (and possibly a password too) to the URL, or an empty URL field.

+1
source

Check if

  • You can view your postgres database from the control panel (e.g. phpmyadmin)
  • Have you checked your rights to the table? usually, if in the code with which it connects without problems, then it should work in phpstorm. But your url seems weird, try changing it with localhost:5432/protomolecule
+1
source

Source: https://habr.com/ru/post/1260912/


All Articles