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 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)

By daniel - February 8, 2019

Hey Kevin,

This sort of error usually points towards a configuration issue; since you appear to be able to connect to the DB, my first guess would be a permission issue. Double check that all of your database info is correct (hostname, database, user, password) and that the user has been granted full privileges to that database. If you are unable to resolve it, I would next recommend passing this error along to IT to see what they can do to help troubleshoot. More information on this error can be found here: https://dev.mysql.com/doc/refman/8.0/en/error-access-denied.html

Cheers,

Daniel
Technical Lead
interactivetools.com