The specified database user/password combination is rejected: [28000][1045] Access denied for user ‘

我在使用 DataGrip 连接 MySQL 数据库时,点击 Test Connection 后,遇到了如下问题:

The specified database user/password combination is rejected: [28000][1045] Access denied for user 'root'@'localhost' (using password: YES)

翻译过来就是:

我出现该问题的原因:

MySQL 的端口号被占用。

首先,我在电脑左下角的搜索栏搜索 cmd,打开 DOS 窗口;

输入命令 netstat -ano|findstr 端口号名称;查看占用 3306 的进程 ID 有哪些?查询出来的结果为两个:16560 27320

然后,我在电脑左下角的搜索栏搜索 任务管理器 打开;

点击 服务,找到占用 3306 端口号的进程 ID ,发现:其中一个是 MySQL(16560,还有一个是安装禅道时生成的服务 mysqlzt(27320

解决方法:

MySQL 的端口号是 3306,禅道默认的端口号也是 3306;它们两个的端口号有冲突。

1、电脑左下角的搜索栏搜索 服务 打开;

 2、在服务里面找到 mysqlzt,右键 停止(O) 就 OK 了。

然后就可以连接成功啦!!!

完。。。 

  • 12
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
The error message "The specified database user/password combination is rejected: [28000][1045] Access denied for user 'root'@'localhost' (using password: NO)" indicates that the specified user 'root' with the provided password is being denied access to the database. This can happen if the password is incorrect or if the user does not have the necessary privileges to access the database. To resolve this issue, you can try the following steps: 1. Double-check the password: Make sure you are using the correct password for the 'root' user. Remember that passwords are case-sensitive, so ensure that you are entering the password exactly as it is. 2. Grant necessary privileges: If the 'root' user does not have the necessary privileges to access the database, you can grant them by logging in to the database with a user that has administrative privileges and running the following command: ``` GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION; FLUSH PRIVILEGES; ``` 3. Reset the password: If you're still unable to access the database, you can try resetting the password for the 'root' user. This can be done by following these steps: - Stop the MySQL server. - Start the MySQL server with the `--skip-grant-tables` option, which allows you to connect to the server without a password. - Connect to the MySQL server and switch to the 'mysql' database. - Update the password for the 'root' user using the following command: ``` UPDATE user SET authentication_string=PASSWORD('new_password') WHERE User='root'; ``` Replace 'new_password' with the desired password. - Flush the privileges and restart the MySQL server. After trying these steps, you should be able to access the database with the 'root' user. If you continue to experience issues, please provide more information about your setup and configuration so that I can assist you further.

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值