电脑太渣带不起项目果断换电脑(开玩笑,扔出来一个尴尬不失礼貌的微笑),以下是本人安装MySQL及Navicat连接MySQL的出现的问题:

首先进行MySQL的安装吧!毕竟只有实践才会报错?下面是MySQL的官方下载网站:

​https://dev.mysql.com/downloads/installer​

下载完然后一直默认,直到你设置完密码我都是不会告诉你们该怎么操作的,但是我会直接上图片?

​https://jingyan.baidu.com/article/fd8044fa10550d5031137adf.html​

本人比较懒,害怕自己的几个图片你们等不到,所有给你们来一个网址

如何测试一下,如果想实现cmd命令使用需要配置环境变量,这个相信你们都会所以不说了,现在终于到我出现问题的地方了?

Navicat连接MySQL:

原因是MySQL8.0版本的加密方式和MySQL5.0的不一样,所以连接会报错。

现在解决加密方式的问题:

    1.先通过命令行进入mysql的root账户:

C:\Users\Administrator>mysql -u root -p

     再输入root的密码:

Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 27
Server version: 8.0.15 MySQL Community Server - GPL

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

       2.更改加密方式:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
Query OK, 0 rows affected (0.10 sec)

       3.更改密码

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
Query OK, 0 rows affected (0.35 sec)

         最后刷新

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.28 sec)

注意:

'root'   为你自己定义的用户名

'localhost' 指的是用户开放的IP,可以是'localhost'

'password' 是你想使用的用户密码

 

然后就完成了,?