Important note about MySQL 8 and PHP 7.2.8

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Fri Sep 21, 2018 2:55 pm    Post subject: Important note about MySQL 8 and PHP 7.2.8 Reply with quote

Hi everybody,

Some users reported issues when running PHP 7.2.8 (and probably later versions) with the new MySQL version 8.

The problem is that there a minor incompatibility with PHP 7.2.8 when it comes to connecting to the newest version of MySQL 8.

1st solution

If you are comfortable tweaking MySQL 8 configuration, it is recommended in https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html#upgrade-caching-sha2-password-compatibility-issues to search for your my.cnf file and add the following line to that file:

Code:
default_authentication_plugin=mysql_native_password


Save the file and restart MySQL service. Your PHP scripts should now be able to connect to MySQL correctly.

2nd solution

Uninstall MySQL 8 and download/install an older version of MySQL which does not exhibit this issue:

For that, go for the last version of the 5.7 branch of MySQL from https://dev.mysql.com/downloads/mysql/5.7.html#downloads .

The problem should be fixed in 7.3 according the PHP bug reports.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
robertwolfe
-


Joined: 21 Sep 2018
Posts: 4
Location: Southaven, MS USA

PostPosted: Fri Sep 21, 2018 8:02 pm    Post subject: Reply with quote

I use version: 5.5.60 of MariaDB Server and 7.3 RC1 of PHP works very nicely with this version. All this is under CentOS 7.5.
Back to top View user's profile Send private message Visit poster's website
admin
Site Admin


Joined: 03 Mar 2002
Posts: 1295

PostPosted: Wed Oct 03, 2018 10:47 am    Post subject: Reply with quote

robertwolfe wrote:
I use version: 5.5.60 of MariaDB Server and 7.3 RC1 of PHP works very nicely with this version. All this is under CentOS 7.5.


It seems that the issue is with MySQL 8 only.
_________________
Follow @abyssws on Twitter
Subscribe to our newsletter
_________________
Forum Administrator
Aprelium - https://aprelium.com
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group