mysqli_connect: HY000/2002: Permission denied

WBOY
Release: 2016-08-08 09:23:49
Original
3326 people have browsed it

mysqli_connect(): (HY000/2002): Permission denied

When configuring the PHP development environment under Linux, this error was reported. I started to think that it was a username + password problem, which caused the database to not be successfully logged in. Repeatedly After checking, it was found that it was not a password problem

In the online search results: it was suggested to change the host connected to mysql from: localhost to 127.0.0.1, but I originally set it to: 127.0.0.1

The problem was not solved in other places

So, I boldly tried 127.0.0.1 Changed to localhost

Problem solved, access successful

The principle will be written in detail next time ~

The above introduces mysqli_connect: HY000/2002: Permission denied, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!