一、
- 在mysql8.0当中对登录密码的认证进行了增强;
- 由原来的“mysql_native_password”改为“caching_sha2_password”;
- 当前的数据库工具并不支持这项功能会导致无法登录,提示错误如下:
**错误提示:**
Authentication plugin ‘caching_sha2_password’ cannot be loaded;
二、
**修改步骤:**
1. 使用管理员身份进入cmd;
2. 进入mysql:
mysql> mysql -u root -p;
3. 查看现有的数据库:show databases;
4. 更改当前登录用户密码类型:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
5. 使用工具连接;