wamp mysql访问被拒绝_访问被拒绝用户'root'@'localhost'(使用密码:是)

我正在使用WAMP服务器进行android注册页面开发。我得到这个错误:访问被拒绝用户'root'@'localhost'(使用密码:是)

Access denied for user 'root'@'localhost' (using password: YES)

请帮我解决这个问题。

这里是我的config.inc.php文件:

/* vim: set expandtab sw=4 ts=4 sts=4: */

/**

* phpMyAdmin sample configuration, you can use it as base for

* manual configuration. For easier setup you can use setup/

*

* All directives are explained in documentation in the doc/ folder

* or at .

*

* @package PhpMyAdmin

*/

/*

* This is needed for cookie based authentication to encrypt password in

* cookie

*/

$cfg['blowfish_secret'] = 'a8b7c6d'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

/*

* Servers configuration

*/

$i = 0;

/*

* First server

*/

$i++;

/* Authentication type */

$cfg['Servers'][$i]['verbose'] = 'mysql wampserver';

//$cfg['Servers'][$i]['auth_type'] = 'cookie';

$cfg['Servers'][$i]['auth_type'] = 'config';

$cfg['Servers'][$i]['user'] = 'root';

$cfg['Servers'][$i]['password'] = '';

/* Server parameters */

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

$cfg['Servers'][$i]['connect_type'] = 'tcp';

$cfg['Servers'][$i]['compress'] = false;

/* Select mysql if your server does not have mysqli */

$cfg['Servers'][$i]['extension'] = 'mysqli';

$cfg['Servers'][$i]['AllowNoPassword'] = true;

/*

* phpMyAdmin configuration storage settings.

*/

// No warning on pmadb tables

$cfg['PmaNoRelation_DisableWarning'] = true;

?>

这里是config.php文件:

/**

* Database config variables

*/

define("DB_HOST", "localhost");

define("DB_USER", "root");

define("DB_PASSWORD", "root");

define("DB_DATABASE", "android_api");

?>

+0

你使用了错误的密码。您在配置中将其指定为空字符串,但显然服务器在root帐户上没有“无密码”。 –

+3

尝试授予权限时可能出现[拒绝用户'root'@'localhost'的访问权限。如何授予权限?](http://stackoverflow.com/questions/8484722/access-denied-for-user-rootlocalhost-while-attempting-to-grant-privileges) –

+0

@MarcB如果我输入任何密码字段我甚至可以打开php管理页面整个页面出现此错误,如果我这样做 –

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值