使用mac环境下navicat连接Mysql提示报错1045 - Access denied for user ‘root’@‘localhost’ (using
password: YES)

mac 环境下mysql登陆失败问题Access denied for user ‘root‘@‘localhost‘ (using passwordYES)


解决方案如下

第一步:停止mysql服务
打开系统偏好设置 -> mysql -> stop MYSQL Server

第二步:禁止mysql的验证功能

  1. 打开Terminal进入mysql的bin目录下:cd /usr/local/mysql/bin/
  2. 使用管理员身份登陆: sudo -i或者 sudo su
  3. 禁止mysql的验证功能:./mysqld_safe --skip-grant-tables &mac 环境下mysql登陆失败问题Access denied for user ‘root‘@‘localhost‘ (using passwordYES)
    第三步:进入Mysql并修改权限
  4. 进入Mysql并修改权限
  5. 使用flush privileges刷新用户权限表:FLUSH PRIVILEGES;
  6. 重置密码
    ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘新密码’;
  7. 退出mysql,退出管理

经过上述操作后,test2依然是不可用的状态。mac 环境下mysql登陆失败问题Access denied for user ‘root‘@‘localhost‘ (using passwordYES)
这时候退出终端,就可以使用了。

相关文章:

  • 2022-12-23
  • 2021-04-09
  • 2021-08-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-02
  • 2021-04-03
猜你喜欢
  • 2022-12-23
  • 2021-07-05
  • 2021-06-26
  • 2022-01-09
  • 2021-10-11
  • 2021-07-08
  • 2021-07-18
相关资源
相似解决方案