一、下載地址mysql
https://dev.mysql.com/downloads/installer/sql
安裝文件:mysql-installer-community-8.0.15.0.msi服務器
二、安裝加密
默認安裝選擇Developer Default,僅做爲服務器選擇Sever only,徹底安裝選擇Full,自定義安裝選擇Custom(根據本身須要安裝)spa
安裝過程當中設置root密碼爲123456blog
三、配置環境變量input
Path 新增 C:\Program Files\MySQL\MySQL Server 8.0\bin;it
四、Navicat鏈接mysql8.0io
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)變量