我一开始没有用集成环境,是单独装的php、apache、还有phpmyadmin,现在改用wamp之后phpmyadmin总是报错#1045 - Access denied for user 'root'@'localhost' (using password: NO),我查找了一下config.inc.php,但是发现文件里有一个叫config.inc.php还有一个叫config.sample.inc.php的文件前者没有改密码和用户名的代码行,后者有,但是我也不能把它的文件名改成config.inc.php
我都怀疑是之前的没有卸载干净
小菜鸟在这里,求大神指导呀!!!!!
把localhost换成127.0.0.1试试
libraries/config.default.php
187 行左右
/**
* MySQL user
*
* @global string $cfg['Servers'][$i]['user']
*/
$cfg['Servers'][$i]['user'] = 'root';//填写用户名
/**
* MySQL password (only needed with 'config' auth_type)
*
* @global string $cfg['Servers'][$i]['password']
*/
$cfg['Servers'][$i]['password'] = '';//填写口令
如没有口令应修改(227行附近)
$cfg['Servers'][$i]['nopassword'] = true;// 默认是 false
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号