Unable to update security settings. Access denied for user 'root'@'localhost' (using password: YES)

http://niu174420064.iteye.com/blog/875908

 

错误说明:

在安装mysql的时候,就会遇到以下错误。遇到错误不可怕,怕的就是被错误所击倒!

The security settings could not be applied to the database because the connection has failed with the following error.

Error Nr. 1045

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

If a personal firewall is running on your machine, please make sure you have opened the TCP port 3306 for connections. Otherwise no client application can connect to the server. After you have opened the port please press [Retry] to apply the security settings.

If you are re-installing after you just uninstalled the MySQL server please note that the data directory was not removed automatically. Therefore the old password from your last installation is still needed to connect to the server. In this case please select skip now and re-run the Configuration Wizard from the start menu.

解决方法:

1, 控制面板卸载MySQL

2, 删除目录 C:\Documents and Settings\All Users\Application Data\MySQL

3.只有彻底删除上次install information之后才能安装,为确保起见,去搜索其他的mysql内容,你也有可能在别的地方安装过mysql的。

3, 重新安装MySQL 就好了

如何你C:\Documents and Settings\All Users下没有Application Data文件夹,选择:工具——文件夹选项——查看——选择显示所有文件和文件夹。

 

 

关键在于删除原来的目录 C:\Documents and Settings\All Users\Application Data\MySQL

然后重新安装会出现:

1UD82L})88]}YJO6TR9B`2G

转载于:https://www.cnblogs.com/IamThat/archive/2013/05/27/3101358.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) 是一个常见的数据库连接错误,表示用户'root'在本地主机上使用了错误的密码进行连接。 解决这个问题的方法有以下几种: 1. 确保用户名和密码正确:首先,确保你使用的用户名和密码是正确的。检查你的数据库配置文件或者数据库管理工具中的用户名和密码是否与你尝试连接的数据库一致。 2. 检查数据库权限:如果用户名和密码是正确的,但仍然无法连接数据库,可能是因为该用户没有足够的权限访问数据库。请确保该用户具有正确的权限,包括连接数据库和执行所需的操作。 3. 检查数据库连接字符串:检查你的数据库连接字符串是否正确。确保连接字符串中的用户名、密码和数据库名称都是正确的。 4. 检查数据库服务器配置:如果以上方法都没有解决问题,可能是因为数据库服务器的配置有问题。请检查数据库服务器的配置文件,确保允许远程连接,并且没有其他限制。 5. 检查防火墙设置:有时候,防火墙设置可能会阻止数据库连接。请确保你的防火墙允许数据库连接。 6. 重置密码:如果你确信用户名和密码是正确的,但仍然无法连接数据库,可以尝试重置密码。使用数据库管理工具或者命令行工具重置密码,并更新你的应用程序中的连接信息。 这些方法应该能够帮助你解决java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)错误。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值