Error setting up mysql during install

6 posts by 2 authors in: Forums > CMS Builder
Last Post: February 8, 2019   (RSS)

By nojust1 - February 6, 2019

I'm getting an error when trying to set up my mysql configuration.

Warning: mysqli::real_connect(): The server requested authentication method unknown to the client [caching_sha2_password] in /var/www/html/orgdirs/wws/cmsb/lib/database_functions.php on line 58

Error connecting to MySQL:
2054 - The server requested authentication method unknown to the client

Thanks,

Kevin

By daniel - February 7, 2019

Hi Kevin,

It looks like your server is running MySQL 8, which can causes issues when attempting to connect with older versions of PHP. The solutions appear to be either updating PHP to at least 7.2.4 or updating the MySQL server configuration to accommodate the older connection method. My recommendation would be to contact your host to let them know of the issue and ask what they can do to help resolve it. 

Here are some pages with additional technical details about the issue and potential fixes that you can pass along:

Good luck getting this sorted out! Let me know if there's anything else I can do to help.

Thanks,

Daniel
Technical Lead
interactivetools.com

By nojust1 - February 8, 2019

Hi Daniel,

Thanks for the information. I had IT changed the setting and I seem to be getting past that error only to get a new error.

MySQL Error: Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER' - in database_functions.php on line 104 by mysqlStrictMode()

Thanks,

Kevin

By daniel - February 8, 2019

Hi Kevin,

Due to its relative newness and low adoption rate, CMSB hasn't yet been officially tested in MySQL 8, which looks to be the cause of your error here. We will work on getting it patched for future releases, but in the meantime, you should be able to fix this by modifying the file "cmsb/lib/mysql_functions.php". Look in that file for a section that looks like this:

    if ($strictMode) { $sql_mode = "STRICT_ALL_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER"; }
    else             { $sql_mode                   = "NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER"; }

Remove the "NO_AUTO_CREATE_USER" portions so that it then looks like this:

    if ($strictMode) { $sql_mode = "STRICT_ALL_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO"; }
    else             { $sql_mode                   = "NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO"; }

Let me know if that does the trick, and I'll be happy to help sort out any further issues you have.

Thanks,

Daniel
Technical Lead
interactivetools.com

By nojust1 - February 8, 2019

Getting closer :)

MySQL Error: Access denied for user 'skcadmin'@'%' (using password: YES)