A connection could not be established with the credentials

Checklist
I have read intro post: About the Installation Issues category
I have read the tutorials, help and searched for similar issues
I provide relevant information about my server (component names and versions, etc.)
I provide a copy of my logs and healthcheck
I describe the steps I have taken to trouble shoot the problem
I describe the steps on how to reproduce the issue


I am on the site to finish installation but a message appear

A connection could not be established with the credentials provided. Please verify the settings.

Hey @Mathz,

For this one, you need a running database. With the previous installation you followed, you should have one running normally. However we never know so, could you run this command please (it’s to check if the database server is running):

sudo systemctl status mysql

If it’s not running you could try to run the same command by replacing status with restart.

If it’s running, it’s probably that the information set in the form are not ok.

And if that doesn’t help and the db is on the same server as passbolt, try 127.0.0.1 for db host ip.

2 Likes

mysql is already running and restart change nothing.
I use default information provided by passbolt and mysql

are you able to connect to the database directly from the command line on the server?

mysql -u passboltadmin -p passboltdb

I can connect to the database

ok good, then I would recommend what @garrett has suggested which is using 127.0.0.1 as the URL assuming you are running the database and passbolt on the same server

When i use 127.0.0.1I go on nginx welcome page and I tried to uninstall and install with 127.0.0.1 and I go on nginx welcome page again. I already tried to install with the ip of my machine and the same message appears : “A connection could not be established with the credentials provided. Please verify the settings.” . I use default username provided by passbolt and mysql.

Are you using 127.0.0.1 as IP for accessing Passbolt? If so, it is not what they are suggesting to you.
You have to follow the same steps you followed, but for now, on the database form, you have to use 127.0.0.1 IP instead of the public one (because possibly the user can’t access your db for security by your configuration). You can check that with the following command:

mysql -h 10.190.16.113 -u passboltadmin -p passboltdb

It’s probably a problem I can’t access if I specify my ip : “ERROR 2002 (HY000): Can’t connect to MySQL server on ‘10.190.16.113’ (115)” contrary to mysql -u passboltadmin -p passboltdb

Just to be sure, does your Passbolt server and database are on the same server or are they set on different machine (or even different virtual machines)?

Passbolt server and database are on the same machine on a virtual machine

If they are on the same server, there is no problem using 127.0.0.1 as database IP, because every connection Passbolt makes to the database is always internally from the server, so you can use 127.0.0.1 and will work fine.

If you want to use our public IP you have to change your MySQL configuration, but you will open a vector to be attacked

I’m reading again the messages in this thread and I realise that there could have a confusion somewhere.
The command that @clayton asked you to run and you did it successfully shows the DB is up and running and it used by default the IP 127.0.0.1.

So I wonder, did you put 127.0.0.1 in your browser address bar or did you try to change the field Database connection url with 127.0.0.1?
Just to make sure, you need to access Passbolt as you did before to see the configuration page and then on the database configuration page use 127.0.0.1 in the DB configuration.

I will change the database IP in /etc/mysql/mariadb.conf.d/50-server.cnf where bind-address = myip and the port used in /etc/mysql/mariadb.cnf
After I will restart mysql

I don’t think you need to do that. It would likely be simpler to set the “Database connection URL” to 127.0.0.1 in the web set up interface