Home >Database >phpMyAdmin >Installing the latest version of MySQL results in an error when logging into phpMyAdmin

Installing the latest version of MySQL results in an error when logging into phpMyAdmin

angryTom
angryTomOriginal
2019-11-23 16:13:164358browse

The following column phpmyadmin tutorial will introduce to you the solution to the error message when logging in to phpMyAdmin due to installing the latest version of MySQL. I hope it will be helpful to friends in need!

Installing the latest version of MySQL results in an error when logging into phpMyAdmin

Installing the latest version of MySQL results in an error when logging in to phpMyAdmin

After installing the latest version of mysql, log in with phpMyadmin , when encountering an error

The first error:

mysqli::real_connect(): (HY000/2002): No such file or directory

Solution:

Put /libraries/config.default.php and /config.

$cfg['Servers'][$i]['host'] = 'localhost'

in the sample.inc.php file is changed to

$cfg['Servers'][$i]['host'] = '127.0.0.1';

The second error:

mysqli_real_connect(): The server requested authentication method unknown to the client [caching_sha2_password]
mysqli_real_connect(): (HY000/2054): The server requested authentication method unknown to the client

Solution:

Terminal login mysql

mysql -u root -p

Modify authorized user

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'

password is the mysql login password

Recommended tutorial:PHPMyAdmin

The above is the detailed content of Installing the latest version of MySQL results in an error when logging into phpMyAdmin. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn