Phpmyadmin #1045-拒绝用户访问';根'@';本地主机';(使用密码:是和否)
我更改了笔记本电脑的硬盘,所以重新安装了程序,所以我安装了wamp服务器,当我试图从浏览器的用户名和密码页面访问本地主机时 因此,我输入用户名root并将密码留空,但出现以下错误: 1045-拒绝用户“root”@“localhost”的访问(使用密码:否) 因此,我通过添加密码来更改config.inc.php文件,并将允许密码从true更改为false 这是文件:Phpmyadmin #1045-拒绝用户访问';根'@';本地主机';(使用密码:是和否),phpmyadmin,wampserver,Phpmyadmin,Wampserver,我更改了笔记本电脑的硬盘,所以重新安装了程序,所以我安装了wamp服务器,当我试图从浏览器的用户名和密码页面访问本地主机时 因此,我输入用户名root并将密码留空,但出现以下错误: 1045-拒绝用户“root”@“localhost”的访问(使用密码:否) 因此,我通过添加密码来更改config.inc.php文件,并将允许密码从true更改为false 这是文件: <?php /* Servers configuration */ $i = 0; $cfg['blowfish_se
<?php
/* Servers configuration */
$i = 0;
$cfg['blowfish_secret'] = 'h]C+{nqW$omNoTIkCwC$%z-LTcy%p6_j$|$Wv[mwngi~|e'; //What you want
//Checking Active DBMS Servers
$wampConf = @parse_ini_file('../../wampmanager.conf');
//Check if MySQL and MariaDB with MariaDB on default port
$mariaFirst = ($wampConf['SupportMySQL'] == 'on' && $wampConf['SupportMariaDB'] == 'on' && $wampConf['mariaPortUsed'] == $wampConf['mysqlDefaultPort']) ? true : false;
if($wampConf['SupportMySQL'] == 'on') {
/* Server: localhost [1] */
$i++;
if($mariaFirst) $i++;
$cfg['Servers'][$i]['verbose'] = 'MySQL';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = $wampConf['mysqlPortUsed'];
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
// Hidden databases in PhpMyAdmin left panel
//$cfg['Servers'][$i]['hide_db'] = '(information_schema|mysql|performance_schema|sys)';
// Allow connection without password
$cfg['Servers'][$i]['AllowNoPassword'] = false;
}
/* Server: localhost [2] */
if($wampConf['SupportMariaDB'] =='on') {
$i++;
if($mariaFirst) $i -= 2;
$cfg['Servers'][$i]['verbose'] = 'MariaDB';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = $wampConf['mariaPortUsed'];
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'root';
// Hidden databases in PhpMyAdmin left panel
//$cfg['Servers'][$i]['hide_db'] = '(information_schema|mysql|performance_schema|sys)';
// Allow connection without password
$cfg['Servers'][$i]['AllowNoPassword'] = false;
}
// Suppress Warning about pmadb tables
$cfg['PmaNoRelation_DisableWarning'] = true;
// To have PRIMARY & INDEX in table structure export
$cfg['Export']['sql_drop_table'] = true;
$cfg['Export']['sql_if_not_exists'] = true;
$cfg['MySQLManualBase'] = 'http://dev.mysql.com/doc/refman/5.7/en/';
/* End of servers configuration */
?>
然后重新启动wamp的所有服务,并通过输入root作为用户名和root作为密码再次打开localhost。我收到了以下错误:
1045-拒绝用户“root”@“localhost”的访问(使用密码:是)
我已经在internet上尝试了所有解决方案,但找不到有效的解决方案,因此我应该如何使其工作
拒绝用户“root”@/localhost”的访问
除此之外,您的密码不正确。看,差不多有两个。我发现你不太可能都试过了。哦,如果你使用的密码仍然不是MySQL注册的密码,那么在配置中设置密码也不能解决这个问题。因此,您对config.inc.php
所做的更改将不会改变任何内容,并且应该被恢复感谢您的所有响应,但没有任何效果!我只是卸载了wamp,然后重新安装,一切都正常!