Cannot connect to MySQL/MariaDB

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

Sorry about that; I mustā€™ve hit the wrong button by mistake.

Anyway, when I run Healthcheck, I get the following results:

 ____                  __          ____  
/ __ \____  _____ ____/ /_  ____  / / /_ 

/ // / __ `/ / / __ / __ / / _/
/ / // ( |
) /
/ / /
/ / / /
/
/ _
,
/
//./_//__/

Open source password manager for teams

Healthcheck shellā€¦Warning Error: Undefined array key ā€œmessageā€
In [/usr/share/php/passbolt/src/Utility/Healthchecks/DatabaseHealthchecks.php, line 72]

2022-09-13 01:25:48 warning: Warning (2): Undefined array key ā€œmessageā€ in [/usr/share/php/passbolt/src/Utility/Healthchecks/DatabaseHealthchecks.php, line 72]
Exception: Connection to Mysql could not be established: SQLSTATE[HY000] [1045] Access denied for user ā€˜ā€™@ā€˜localhostā€™ (using password: NO)
In [/usr/share/php/passbolt/vendor/cakephp/cakephp/src/Database/Driver.php, line 133]

I donā€™t understand why thereā€™s no username; I entered one when I ran the installation.

(Perhaps this would be a good time to give a few details. Iā€™m running Ubuntu 22.04 with php 8.1 installed by the passbolt-ce-server. I created the passboltdb database with user passboltadmin during the installation process. I use MariaDB instead of MySQL if that makes a difference.)

I have tried purging and reinstalling several times, and the error messages remain unchanged. I even had to manually edit /etc/passbolt/passbolt.php to get the right URL, but when I start to run the web-based configuration all I get is ā€œConfig file ā€œpassbolt.phpā€ did not return an arrayā€

Iā€™ve used previous versions of Passbolt, but itā€™s been a real pain recovering from a relatively-recent server hard-drive crash, and thatā€™s where I find myself.

Further information available on request, and any help gratefully accepted!

Hi @DaddyWarlock Others have recently experienced this and weā€™re to determine why this is happening. Iā€™m sorry to hear about your hard drive crashing.

This is a fresh install, correct? Are you re-using any files from the previous install?

Fresh install. I purged all the old files before I started.

1 Like

@DaddyWarlock In the /etc/passbolt/passbolt.php config file, check to see if your chosen database credentials are shown in the Datasources section. If not, add them as string values and see what happens.

Iā€™m also curious how it was if they werenā€™t there. Empty fields?