使用Navicat连接数据库报错-解决方式

报错: 1045-Access denied for user root@localhost(using passwordYES)

1. win + r 打开: powerShell

2. 启动:  net start mysql

3. 重置:  mysql -u root -p

4.修改密码:  

mysql8.0前的版本修改密码的命令:
update mysql.user set authentication_string=password(“新密码”) where user=“root”;

mysql8.0以后的版本修改密码的命令:
ALTER USER ‘root’@‘localhost’ IDENTIFIED WITH mysql_native_password BY ‘新密码’

5. 再去Navicat连接:

IP: 127.0.0.1

SERVE: 5.7.43

PORT: 3306

NAME: ROOT

NEW PASSWORD: 123456

OLD PASSWORD:  a+*YGQ-Ik1Jo

你可能感兴趣的:(数据库)