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?