I have just installed php7.4, everything seems ok but when I try to go on my phpmyadmin, I can’t :
Note works fine in php7.3 before this installation
The error is :
mysqli_real_connect(): Unexpected server response while doing caching_sha2 auth: 109
mysqli_real_connect(): (HY000/2006): MySQL server has gone away
looking my php mysql library :php7.4-mysql
. it’s installed.
Forget something ?
Thank you.
NOTICE: Not enabling PHP 7.4 FPM by default.
NOTICE: To enable PHP 7.4 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.4-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
Traitement des actions différées (« triggers ») pour libapache2-mod-php7.4 (7.4.
0-1+ubuntu19.10.1+deb.sury.org+1) ...
apt-cache policy php7.4
php7.4:
Installé : 7.4.0-1+ubuntu19.10.1+deb.sury.org+1
Candidat : 7.4.0-1+ubuntu19.10.1+deb.sury.org+1
Table de version :
*** 7.4.0-1+ubuntu19.10.1+deb.sury.org+1 500
500 http://ppa.launchpad.net/ondrej/php/ubuntu eoan/main amd64 Packages
500 http://ppa.launchpad.net/ondrej/php/ubuntu eoan/main i386 Packages
100 /var/lib/dpkg/status
4
Answers
you can change the encryption of the password like this.
If you still use the dated
mysql_native_password
method, which is HIGHLY DISCOURAGED as it is considered less secure, you could set the default authentication plug-in to native password by addingdefault_authentication_plugin = mysql_native_password
to the[mysqld]
section of my.cnf.In file
/etc/mysql/my.cnf
After
[mysqld]
add:default-authentication-plugin = mysql_native_password
Example of my
/etc/mysql/my.cnf
And remember use mysql_native_password not good because of security.
I had the same issue, but using
mysql_native_password
was not possible withPHP7.4-mysql-pdo
, even on setting inmy.cnf
as it worked onPHP7.3-mysql-pdo
.I had to alter every user with this query:
where
username
is the database username andpassword
is the password of the database user.