#1045 - 用户 'root'@'localhost' 的访问被拒绝(使用密码:是)
这似乎是多余的,但我无法找到正确的解决方案.
This might seem redundant but I was unable to find a correct solution.
我无法使用 mysql 控制台登录到 mysql.它要求输入密码,我不知道我实际输入了什么.(有没有办法获取或更改密码?)这就是我的 config.inc 的外观.
I was unable to login to mysql using the mysql console.It is asking for a password and I have no clue what I actually entered.(Is there a way to get the password or change it?) This is how my config.inc look.
当我尝试打开 phpmyadmin 时出现此错误(#1045 - 用户 'root'@'localhost' 的访问被拒绝(使用密码:YES))
When I try to open phpmyadmin I get this error(#1045 - Access denied for user 'root'@'localhost' (using password: YES))
<?php
/* Servers configuration */
$i = 0;
/* Server: localhost [1] */
$i++;
$cfg['Servers'][$i]['verbose'] = 'localhost';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['socket'] = '';
$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'] = 'prakash123';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
/* End of servers configuration */
$cfg['DefaultLang'] = 'en-utf-8';
$cfg['ServerDefault'] = 1;
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/* rajk - for blobstreaming */
$cfg['Servers'][$i]['bs_garbage_threshold'] = 50;
$cfg['Servers'][$i]['bs_repository_threshold'] = '32M';
$cfg['Servers'][$i]['bs_temp_blob_timeout'] = 600;
$cfg['Servers'][$i]['bs_temp_log_threshold'] = '32M';
?>
我试图卸载(加上删除所有相关文件)WAMP 并重新安装.它也没有帮助.在重新安装 WAMP 服务器时,它不要求任何用户名密码的东西,我不知道为什么.非常感谢任何帮助.
I have tried to uninstall( Plus Deleted all the related files) WAMP and reinstall.It didn't help either. While reinstalling WAMP server it is not asking for any username password stuff I don't know why. Any help is highly appreciated.
推荐答案
问题是我安装了 2 个 Mysql 实例,我不知道这两个实例的密码.只需检查端口 80 是否被任何一个程式.这就是我所做的
The problem was I have 2 instances of Mysql installed and I didn't know the password for both instances.Just check if port 80 is used by any of the programs. This is what I did
1.退出Skype,因为它正在使用80端口.(请检查80端口是否被任何其他程序使用).
1.Quit Skype because it was using port 80.(Please check if port 80 is used by any other program).
2.在任务管理器中搜索Mysql服务并停止.
2.Search for Mysql services in task manager and stop it.
3.现在删除所有相关的mysql文件.确保删除所有文件.
3.Now delete all the related mysql files.Make sure you delete all the files.
4.重新安装
相关文章