phpMyAdmin - 用户'root'@'localhost'拒绝访问

时间:2012-03-07 22:20:03

标签: phpmyadmin

我在CentOS VM中,我可以登录IP / phpmyadmin并执行查询。

如果我想在终端中执行mysqldump,我会得到这个:

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

我编辑了/etc/phpMyAdmin/config.inc.php

$cfg['Servers'][$i]['controluser'] = 'root';
$cfg['Servers'][$i]['controlpass'] = 'mypassword';

重启mysqld,同样的错误。

我甚至尝试过运行查询:

mysql>UPDATE mysql.user 
->SET Password=PASSWORD("*******")
->WHERE User="root";
mysql>FLUSH PRIVILEGES;

我还能尝试什么?感谢。

此外,我在phpMyAdmin中无法编辑权限:http://screencast.com/t/G9belKdy5mzD

为'root'@'localhost'显示资助

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '*52DD4BE9BA633906276F1950905A9013E2A77FE3' WITH GRANT OPTION

1 个答案:

答案 0 :(得分:0)

即使您已登录

,也请使用-p参数

mysqldump -p database > file.sql