Home > Backend Development > PHP Tutorial > phpmyadmin访问拒绝

phpmyadmin访问拒绝

WBOY
Release: 2016-06-23 14:14:00
Original
884 people have browsed it

从网上下载的XAMPP解压使用没有对数据库设置过密码,默认为空的,之前一直用的好好的,今天突然报错,提示“#1045 - Access denied for user 'root'@'localhost' (using password: NO) ”,网上说密码不对,可是我根本没有设置过密码,谁知道问题在哪里啊,服务启动都没问题的,Apache可以的,等着急用……


回复讨论(解决方案)

那你在dos命令行下用root能连接上吗

可以的,直接运行mysql.exe文件连用户名密码都不用输入,就可以查看数据库

找到phpmyadmin的配置文件,好像是 config.inc.php 文件,找到下面行:
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';

将password 项改为空,重启下服务器试试看。

password是空的,我没有做设置啊,纠结死啦

一般找到配置文件里的phpmyadmin.conf,把里面的localhost对应的deny改为allow就好了!

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