@Lars_Erik_Dangvard_J I found in the code where the user is created:
// This array is filled with pairs of entries
// The first entry is the actual query to be run
// The second entry is the string to be displayed if the query fails
// (this can be NULL, in which case the actual query will be used)
const char *cmds[] = {
"SET SESSION sql_log_bin = OFF;",
nullptr,
"DROP USER IF EXISTS 'mysql.pxc.sst.user'@localhost;",
nullptr,
"CREATE USER 'mysql.pxc.sst.user'@localhost "
" IDENTIFIED BY '%s' ACCOUNT LOCK;",
"CREATE USER mysql.pxc.sst.user IDENTIFIED WITH * BY * ACCOUNT LOCK",
"GRANT 'mysql.pxc.sst.role'@localhost TO 'mysql.pxc.sst.user'@localhost;", nullptr,
"SET DEFAULT ROLE 'mysql.pxc.sst.role'@localhost to 'mysql.pxc.sst.user'@localhost;", nullptr,
"ALTER USER 'mysql.pxc.sst.user'@localhost ACCOUNT UNLOCK;",
nullptr,
nullptr,
nullptr
};
Notice that the method is not specified, which means it will use the server’s default. You need to configure default_authentication_plugin=caching_sha2_password
in your my.cnf and restart the server.