数据库连接失败:mysql_error:Access denied for user 'root'@'localhost'

WBOY
Release: 2016-06-23 14:26:49
Original
1536 people have browsed it

疑难杂症

数据库连接失败:mysql_error:Access denied for user 'root'@'localhost' (using password: YES)

这个是怎么回事,这是要什么密码啊?
我装AppServ  在吧项目弄进去然后访问项目网站就出现这个错误。
访问phpMyAdmin是正常
(不是服务器是自己的电脑)
求大家帮忙,劲量详细点。对php只是了解

回复讨论(解决方案)

root用户没用权限,检查下你的密码。

找到你项目的配置文件,把密码改一改。

mysql_error:Access denied for user 'root'@'localhost' (using password: YES)
说的是你的 root 用户的口令错了

root 的默认的管理员用户名,只要你没有删掉他,那么 root 用户总是存在的
那么问题就出在口令上了,using password: YES 表示你输入了口令,但口令输错了

既然 phpMyAdmin 可以工作,那你就从 phpMyAdmin 的配置文件里找出口令就是了

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!