View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0027794||mantisbt||db mysql||public||2020-12-22 18:50||2021-01-16 05:01|
|Status||closed||Resolution||no change required|
|Summary||0027794: "The server requested authentication method unknown to the client" error with `root` with MySQL 8.0.22|
I'm doing a fresh install of:
on a basic/vanilla FAMP server.
As per the Admin Guide, after basic setup I go here:
and (after getting past 0027793) the setup page showed up.
I forget the exact field names, but for the "high-privileged database account" I used "root" and the correct password (
I found the presence of the word "unknown" to be suspicious. It reminded me of similar authentication issues I had with other web apps with MySQL 8 (vs earlier versions). I found my solution here:
which was to use my already-created
I'm not sure if there's a mantis bug here exactly. But at the very least it would be nice to improve the Admin Guide and/or the error message mantis produces. I could probably submit a patch to the Admin Guide, after some discussion here.
|Tags||No tags attached.|
I've been using Mantis with MySQL 8.0.22 for several months on my dev box, without any issues.
I just double-checked by installing with an account having
According to PHP Documentation, caching_sha2_password, [...] is not recognized by the older PHP (mysqlnd) releases so maybe this is caused by your PHP version ?
As things stand, the problem is not reproducible on my end, but I would agree it may be useful to add a warning to the admin guide, referencing the case of using MySQL 8 with PHP <7.1.16 or < 7.2.4, if you can confirm this is the root cause of your problem.
In that case, the workaround would be to create a privileged account using mysql_native_password authentication e.g.
Grant privileges as appropriate (see tohttps://mantisbt.org/docs/master/en-US/Admin_Guide/html-desktop/#admin.install.new)
@dregad thanks for the fast response.
I'm using the following versions of things:
and indeed specifying that user as the "high-privileged database account" resulted in success.
So maybe something is different about my mysql
I installed mysql very plainly:
Per the comment in the link you gave, I checked the list of supported authentication methods in the "Loaded plugins" row of the "mysqlnd" section in phpinfo(). I see:
Should I be expecting to see
After additional searching, I'm starting to see this mysql 8 password change is a well-known compatibility issue with PHP! But most of what I've read says it should be fixed in PHP 7.4.
I've also confirmed the difference between my mysql users:
Indeed I came to the same conclusion.
As mentioned, I also confirmed yesterday that I can make a successful connection using a user identified with caching_sha2_password plugin, both on PHP 7.4.13 and PHP 8.0.0.
Just to confirm this is not somehow caused by MantisBT or the underlying ADOdb library, you may want to check if you can connect successfully with your root user, using equivalent low-level API calls:
EDIT: 2nd command is probably not necessary/relevant, but since ADOdb calls this, we might as well do exactly the same.
This works for me, and my root user is defined just like yours.
So I tried those 3 lines, with the correct root password, and find the following in my apache error log:
Removing the middle line gives the exact same.
Which I guess means no mantis bug here.
What OS is your dev environment?
The original PHP bug seems to be this one:
Ubuntu 20.04 with PHP installed via ondrej's PPA
Out of curiosity, if you happen to find the solution to the problem, please let me know.
Could you share the list of supported authentication methods in the "Loaded plugins" row of the "mysqlnd" section in phpinfo() on your system please?
I think it's a FreeBSD issue, and have created a ticket with them: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252420