Error instling FreePBX 15/16 on Debian (MySql 8.0 Cluster)


I’m trying to install FreePBX 16 (the problem seems to be present with FreePBX 15 as well) on Debian 11.

I’m following this guide:

On my system, i have installed MySql 8.0 Cluster community edition instead of regular mariadb server, but the istance that will keep asterisk and cdr databases does not have any replica active.

When i run “install -v -dbuser=root -dbpass=mypassword”, i get the following error:

Assuming you are Database Root
Checking if SELinux is enabled...Its not (good)!
Reading /etc/asterisk/asterisk.conf...Done
Checking if Asterisk is running and we can talk to it as the 'asterisk' user...Yes. Determined Asterisk version to be: 16.16.1
Checking if NodeJS is installed and we can get a version from it...Yes. Determined NodeJS version to be: 12.22.5
Preliminary checks done. Starting FreePBX Installation
Checking if this is a new install...Yes (No /etc/freepbx.conf file detected)
Database Root installation checking credentials and permissions..Connected!

In utility.functions.php line 120:
  SQLSTATE[HY000] [1045] Access denied for user 'freepbxuser'@'localhost' (using password: YES)::SQLSTATE[HY000] [1045] Access denied for user 'freepbxuser'@'localhost' (using password: YES)                                                                    

In Database.class.php line 144:
  SQLSTATE[HY000] [1045] Access denied for user 'freepbxuser'@'localhost' (using password: YES)  

The installer creates the database “asterisk”, but (i think) it fails to create the user freepbxuser.

Does anybody have an idea of how to solve or bypass the problem to complete the installation process?

Thank you


MariaDB supports implicit user creation on grant privileges; MySql don’t.

I had to modify installlib/installcommand.class.php, splitting the query

$sql = "GRANT ALL PRIVILEGES ON ".$amp_conf['AMPDBNAME'].".* TO '" . $amp_conf['AMPDBUSER'] . "'@'". $amp_conf['AMPDBHOST']."' IDENTIFIED BY '" . $amp_conf['AMPDBPASS'] . "'";

in two separate instructions:

$sql = "CREATE USER '" . $amp_conf['AMPDBUSER'] . "'@'".$amp_conf['AMPDBHOST']."' IDENTIFIED BY '" . $amp_conf['AMPDBPASS'] . "'";
$sql = "GRANT ALL PRIVILEGES ON ".$amp_conf['AMPDBNAME'].".* TO '" . $amp_conf['AMPDBUSER'] . "'@'". $amp_conf['AMPDBHOST']."'";

Maybe this can be fixed in future releases?


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.