splewis / get5

CS:GO Sourcemod plugin for competitive matches/scrims
GNU General Public License v3.0
556 stars 174 forks source link

The MySQL plugin doesn't seem to support MySQL's 8.0 new authentication scheme #672

Closed astutejoe closed 3 years ago

astutejoe commented 3 years ago

The MySQL client in the MySQL plugin is outdated with a deprecated authentication scheme.

Expected behavior

get5 successfully connects to the MySQL Server 8.0 database

Actual behavior

Error connecting with the following callstack:

L 06/06/2021 - 22:48:35: SourceMod error session started
L 06/06/2021 - 22:48:35: Info (map "de_dust2") (file "/home/dathost/csgo_ds/csgo/addons/sourcemod/logs/errors_20210606.log")
L 06/06/2021 - 22:48:35: [SM] Exception reported: Could not connect to get5 database: [2059]: Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/local/mysql/lib/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
L 06/06/2021 - 22:48:35: [SM] Blaming: get5_mysqlstats.smx
L 06/06/2021 - 22:48:35: [SM] Call stack trace:
L 06/06/2021 - 22:48:35: [SM]   [0] SetFailState
L 06/06/2021 - 22:48:35: [SM]   [1] Line 61, ./scripting/get5_mysqlstats.sp::OnPluginStart
L 06/06/2021 - 22:48:35: [SM] Unable to load plugin "get5_mysqlstats.smx": Error detected in plugin startup (see error logs)

Steps to reproduce

TandelK commented 3 years ago

The only current workaround with Sourcemod MySQL Support has Native Password support. Would recommend you to create a new user with command of

CREATE USER 'get5'@'localhost'IDENTIFIED WITH mysql_native_password BY 'password';

Also if you want to know how to give specific database access to that user is with GRANT ALL PRIVILEGES ON db_name.* to 'get5'@'localhost' WITH GRANT OPTION;

Use this settings in databases.cfg settings.

astutejoe commented 3 years ago

That's what I ended up doing, I hadn't realized at the time though, that the MySQL client comes from Sourcemode, thanks a lot! Closing the issue!