Bluecherry v3 fresh install could not connect to database (SOLVED)

I used the installation script to install bluecherry v3 and got the following error when accessing the GUI:

Fatal error: could not connect to the database:

I’m not sure why it didn’t work. Also, I’m not sure where the config file is located, so that I can manually check whether the database settings are configured correctly.

is it this file?

/usr/share/bluecherry/bluecherry.conf.in

Here’s the contents:

# Bluecherry configuration file

# Used to be sure we don't use configurations not suitable for us
version = "1.0";

bluecherry:
{
  db:
  {
    # 0 = sqlite, 1 = pgsql, 2 = mysql
    type = 2;
    dbname = "_DBC_DBNAME_";
    user = "_DBC_DBUSER_";
    password = "_DBC_DBPASS_";
    host = "_DBC_HOST_";
    userhost = "_DBC_USERHOST_";
  };
};

MySQL server is running.

Okay I see that bc is having issues accessing the database:

Access denied for user 'bluecherry'@'localhost' (using password: YES)

I’ll see if I can fix it and respond back here.

mysql user and host permissions:

mysql> SELECT user, host FROM mysql.user;
+---------------+-----------+
| user          | host      |
+---------------+-----------+
| bluecherry    | localhost |
| mysql.session | localhost |
| mysql.sys     | localhost |
| root          | localhost |
+---------------+-----------+
4 rows in set (0.00 sec)

Attempted resolutions:

Did not work:

GRANT ALL PRIVILEGES ON bluecherry.* TO 'bluecherry'@'localhost' IDENTIFIED BY 'password';

The configuration file is /etc/bluecherry.conf, it should look like this, I added in place holders.

# Bluecherry configuration file

# Used to be sure we don't use configurations not suitable for us
version = "1.0";

bluecherry:
{
  db:
  {
    # 0 = sqlite, 1 = pgsql, 2 = mysql
    type = 2;
    dbname = "bluecherry";
    user = "bluecherry";
    password = "bluecherry";
    host = "localhost";
    userhost = "localhost";
  };
};
1 Like

Ok the issue was that when I pasted the password from my password manager during the installation process, it somehow gained some other phrase.

Updating the /etc/bluecherry.conf file with the correct password has resolve this issue.

Thanks Curtis.