Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail with mariadb-10.4.11: Access denied for user 'root'@'localhost' at lib/Test/mysqld.pm line 143 #32

Closed
ppisar opened this issue Jan 29, 2020 · 2 comments

Comments

@ppisar
Copy link
Contributor

ppisar commented Jan 29, 2020

After upgrading mariadb from 10.3.21 to 10.4.11, all Test-mysqld tests fail like this:

$ perl -Ilib t/01-raii.t 
DBI connect('dbname=mysql;mysql_socket=/tmp/cXEW5xhQn2/tmp/mysql.sock;user=root','',...) failed: Access denied for user 'root'@'localhost' at lib/Test/mysqld.pm line 143.
Access denied for user 'root'@'localhost' at lib/Test/mysqld.pm line 143.

It seems to be triggered by a change in the default authentication settings https://mariadb.com/kb/en/authentication-plugin-unix-socket/ brought with 10.4.3. Probably with this commit MariaDB/server@7f6d88944c.

As a result mariadb uses unix socket for a local connection and enforces that the user specified with --user option is equaled to the user who runs the SQL client.

ppisar added a commit to ppisar/p5-test-mysqld that referenced this issue Apr 1, 2020
MariaDB 10.4.3 changed a default authentication mechanism for UNIX
socket connections. As a result tests stated to fail on failed
authentication.

This patch adjusts dsn() computation and a test to omit the erroneous
user=root parameter.

The same MariaDB also started to enforce setting root password. Since
there is no password management in Test::mysqld, skipped fixing this
part of the code. I only left a comment there.

kazuho#32
@ppisar
Copy link
Contributor Author

ppisar commented Apr 1, 2020

I should notice that a current mariadb C client library has a broken UNIX socket authentication and a fix [https://jira.mariadb.org/browse/CONC-441?focusedCommentId=146491&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-146491] will be released in mariadb 10.4.13.

@Songmu
Copy link
Collaborator

Songmu commented Apr 6, 2024

Thanks!

@Songmu Songmu closed this as completed Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants