Skip to content

Fixed mysql_native_password being used due to empty password #14118

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

Closed

Conversation

KentarouTakeda
Copy link
Contributor

I resolved a test failure on CircleCI with the newly released MySQL 8.4 Server. This issue is discussed in the following references:
https://externals.io/message/123253
#14112
#14113

In MySQL 8.4, the authentication plugin mysql_native_password is no longer loaded by default.However, mysqlnd still defaults to using mysql_native_password as the authentication method when the password is not set, as specified in .circleci/config.yml.

The same test passes on GitHub Actions because the password is set as follows:
https://github.com/php/php-src/blob/master/.github/workflows/push.yml#L52-L54

By aligning the test configurations in CircleCI with those in GitHub Actions, we can ensure compatibility with MySQL 8.4 Server.

@SakiTakamachi
Copy link
Member

SakiTakamachi commented May 3, 2024

I've investigated this and it's likely that the test will still fail even if make this PR change. At least it fails on my machine.

Even though caching_sha2_password is specified in client_plugin_name of Protocol::HandshakeResponse41, this error occurs if a non-existing user name is specified.
https://dev.mysql.com/doc/dev/mysql-server/latest/page_protocol_connection_phase_packets_protocol_handshake_response.html

However, to my great horror and strangeness, this error no longer recurred during the investigation. I haven't made any changes....

Although I can't be sure yet, it may be a flaky bug on the MySQL side.

@KentarouTakeda
Copy link
Contributor Author

If the cause is a MySQL flaky bug, it may be best to fix the MySQL version to 8.3 as per #14112 until it is fixed.

In that case, tests with GitHub Actions should also be fixed to 8.3. If Saki is right, those tests may start failing at some point, just like CircleCI.

By the way, MySQL is not compliant with Semantic Versioning, so even without this bug, 8 may still be too aggressive. Shall I recreate the pull request with the 8.3 fixed?

@SakiTakamachi
Copy link
Member

@KentarouTakeda

The following bug report may possibly be related to this problem:
https://bugs.mysql.com/bug.php?id=114856

Indeed, that 8.4 has only just been released, so it may be sensible to stick with 8.3 until things settle down.

If you could create a PR that would be very helpful :)

@methane
Copy link

methane commented May 4, 2024

I can reproduce the error.
This has been reported in https://bugs.mysql.com/bug.php?id=114876

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

Successfully merging this pull request may close these issues.

3 participants