1、下載地址
https://dev.mysql.com/downloads/installer/
安裝文件:mysql-installer-community-8.0.15.0.msi
2、安裝
默認安裝選擇Developer Default,僅作為服務器選擇Sever only,完全安裝選擇Full,自定義安裝選擇Custom(根據自己需要安裝)
安裝過程中設置root密碼為123456
3、配置環境變量
Path 新增 C:\Program Files\MySQL\MySQL Server 8.0\bin;
4、Navicat連接mysql8.0
C:\Users\Administrator>mysql -u root -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 24
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> ALTER USER 'root'@'localhost' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER;(更改加密方式)
Query OK, 0 rows affected (0.09 sec)
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';(更改密碼)
Query OK, 0 rows affected (0.06 sec)
mysql> FLUSH PRIVILEGES;(刷新)
Query OK, 0 rows affected (0.05 sec)