Bug #76651 [Com]: Can't establish a connection to MySQL after upgrading PHP from 7.2.7 to 7.2.8

From: Date: Tue, 07 Aug 2018 07:39:38 +0000
Subject: Bug #76651 [Com]: Can't establish a connection to MySQL after upgrading PHP from 7.2.7 to 7.2.8
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-216656@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76651&edit=1

 ID:                 76651
 Comment by:         thaddee at bechtold dot me
 Reported by:        itaylorswift365 at gmail dot com
 Summary:            Can't establish a connection to MySQL after
                     upgrading PHP from 7.2.7 to 7.2.8
 Status:             Assigned
 Type:               Bug
 Package:            MySQLi related
 Operating System:   Debian 9.5 x64
 PHP Version:        7.2.8
 Assigned To:        mysql
 Block user comment: N
 Private report:     N

 New Comment:

Hi, Change the default_authentication_plugin of MySQL 8
https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password


Previous Comments:
------------------------------------------------------------------------
[2018-08-06 21:10:33] eugene at zhegan dot in

Seems like something is terribly broiken in 7.2.8, because only downgrading to 7.2.7 helps.
I've even built 7.2.8 with this changeset: https://github.com/php/php-src/commit/d6e81f0bfd0cb90586dd83d4fd47a4302605261a
, doesn't help at all.

------------------------------------------------------------------------
[2018-08-05 19:41:53] theodorejb at outlook dot com

I'm also unable to connect to MySQL 8.0.12 after upgrading to PHP 7.2.8 (running on Windows 10
x64). The error message I get is "Access denied for user 'root'@'localhost'
(using password: YES)" and PHP also outputs a warning saying "mysqli::__construct(): PHP
was built without openssl extension, can't send password encrypted". This doesn't
make sense to me since I do have the openssl extension enabled.

------------------------------------------------------------------------
[2018-07-28 07:00:21] no at mail dot here

PHP 7.2.7 works just fine with MySQL 8.0.11 when using mysql_native_password for logins, but PHP
7.2.8 does not.

------------------------------------------------------------------------
[2018-07-27 15:44:59] brayamrivas at gmail dot com

Hi guys,

You can try to add this line into /etc/my.cnf (Systems based on Linux OS):

default-authentication-plugin=mysql_native_password


Then, restart mysqld proccess. 

This works for me. I'm using Laravel 5.5.

Best regards,
BR

------------------------------------------------------------------------
[2018-07-26 20:30:08] amenshchikov at gmail dot com

I had the same problem and solved it by changing password for MySQL user without
'mysql_native_password' plugin:
  ALTER USER 'user'@'localhost' IDENTIFIED BY 'password';

But I was forced to use password with max lenght of 16 chars, otherwise I was getting the connection
error.

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=76651


--
Edit this bug report at https://bugs.php.net/bug.php?id=76651&edit=1


Thread (22 messages)

« previous php.bugs (#216656) next »