Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

mysqlnd fails to authenticate with sha256_password accounts using passwords longer than 19 characters. #11438

Closed
@weigon

Description

@weigon

Description

The following code:

<?php// CREATE USER sha256_20 IDENTIFIED WITH sha256_password BY '01234567890123456789';// CREATE USER sha256_19 IDENTIFIED WITH sha256_password BY '0123456789012345678';newmysqli("127.0.0.1","sha256_19","0123456789012345678");newmysqli("127.0.0.1","sha256_20","01234567890123456789");

Resulted in this output:

PHP Fatal error:  Uncaught mysqli_sql_exception: Access denied for user 'sha256_20'@'localhost' (using password: YES) in Command line code:1Stack trace:#0 Command line code(1): mysqli->__construct()#1 {main}  thrown in Command line code on line 1

But I expected this output instead:

With the mysql client, authentication works as expected.

$ mysqladmin --user=sha256_19 --password=0123456789012345678   pingmysqld is alive$ mysqladmin --user=sha256_20 --password=01234567890123456789 pingmysqld is alive

PHP Version

PHP 8.1.2

Operating System

Ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp