Error! Invalid Database Permissions. The error was: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client


(Rick) #1

Hey guys, just trying to install FreePBX on Ubuntu for the first time… installed all the pre-reqs… when I try to run ./install -n I get these error messages…

Database Root installation checking credentials and permissions…PHP Warning: PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in /usr/src/freepbx/installlib/installcommand.class.php on line 428

Error!
Invalid Database Permissions. The error was: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

Anyone ever had to deal with this one ?

Any help appreciated. Thanks!


#2

if you set a root password for mysql you will need to supply it to the install script ( --help )


(Rick) #3

Yeah I had accidentally set a root password for mysql… i tried to add that during install… still same error pops up :frowning:

I was following the install sequence on this page –
https://wiki.freepbx.org/display/FOP/Installing+FreePBX+14+on+Ubuntu+18.04


#4

Hehe, you can’t both claim you read and comprehended the installation recipe and yet still call it an accident :wink:

.
.
.
As part of this install, you may be asked (possibly several times) for a mysql password. DO NOT SET A MYSQL PASSWORD AT THIS POINT. Your machine will automatically generate a secure password later in the installation.

.
.
.

but you can ‘apt purge’ mysql/mariadb and start over or you can add --dbuser and --dbpass to the ./install script.

as I suggested

./install --help

should give you

|  ____|           |  __ \|  _ \ \ / /
| |__ _ __ ___  ___| |__) | |_) \ V /
|  __| '__/ _ \/ _ \  ___/|  _ < > <
| |  | | |  __/  __/ |    | |_) / . \
|_|  |_|  \___|\___|_|    |____/_/ \_\
Usage:
  install [options]

Options:
      --dbengine=DBENGINE          Database engine [default: "mysql"]
      --dbname=DBNAME              Database name [default: "asterisk"]
      --cdrdbname=CDRDBNAME        CDR Database name [default: "asteriskcdrdb"]
      --dbuser=DBUSER              Database username [default: "root"]
      --dbpass=DBPASS              Database password [default: ""]
      --user=USER                  File owner user [default: "asterisk"]
      --group=GROUP                File owner group [default: "asterisk"]
      --dev-links                  Make links to files in the source directory instead of copying (developer option)
      --webroot=WEBROOT            Filesystem location from which FreePBX files will be served [default: "/var/www/html"]
      --astetcdir=ASTETCDIR        Filesystem location from which Asterisk configuration files will be served [default: "/etc/asterisk"]
      --astmoddir=ASTMODDIR        Filesystem location for Asterisk modules [default: "/usr/lib/asterisk/modules"]
      --astvarlibdir=ASTVARLIBDIR  Filesystem location for Asterisk lib files [default: "/var/lib/asterisk"]
      --astagidir=ASTAGIDIR        Filesystem location for Asterisk agi files [default: "/var/lib/asterisk/agi-bin"]
      --astspooldir=ASTSPOOLDIR    Location of the Asterisk spool directory [default: "/var/spool/asterisk"]
      --astrundir=ASTRUNDIR        Location of the Asterisk run directory [default: "/var/run/asterisk"]
      --astlogdir=ASTLOGDIR        Location of the Asterisk log files [default: "/var/log/asterisk"]
      --ampbin=AMPBIN              Location of the FreePBX command line scripts [default: "/var/lib/asterisk/bin"]
      --ampsbin=AMPSBIN            Location of the FreePBX (root) command line scripts [default: "/usr/sbin"]
      --ampcgibin=AMPCGIBIN        Location of the Apache cgi-bin executables [default: "/var/www/cgi-bin"]
      --ampplayback=AMPPLAYBACK    Directory for FreePBX html5 playback files [default: "/var/lib/asterisk/playback"]
  -r, --rootdb                     Database Root Based Install. Will create the database user and password automatically along with the databases
  -f, --force                      Force an install. Rewriting all databases with default information
  -h, --help                       Display this help message
  -q, --quiet                      Do not output any message
  -V, --version                    Display this application version
      --ansi                       Force ANSI output
      --no-ansi                    Disable ANSI output
  -n, --no-interaction             Do not ask any interactive question
  -v|vv|vvv, --verbose             Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

(Rick) #5

I believe its something other than the actual password itself… since I was able to add the password during install and still get the same error…


#6

And I believe your beliefs are wrong, it is NOT " something else".

You are missing my point, the script says very very definitely to NOT add a root password to mysql as you are installing the OS.

Easiest thing for you to do is start over and follow the script “to the letter”

(I can assure you though that ./install works perfectly if you have set ACL’s in MYSQL/MariaDB and so inform the scripts)

edit:-

If I where you, I would just go initially with:-

route and save yourself a lot of “incremental upgrading”


(Rick) #7

Alright! after going over every step line by line and comparing what was supposed to happen with what did happen I found the error…

The ODBC connector portion of that install page is deprecated and that portion of the install didn’t complete properly… Was able to get the most recent ODBC connector install and boom… fixed it! It was not password related at all…

Thanks anyways for your help!


#8

If you are just starting, try over with

Kudos @billsimon Way less stressfull over the long run and you will be “up to date” with all the “old stuff” polished

(Works with Raspberries too)


(system) closed #9

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