MySQL8.0.15的安装与配置---win10

时间:2023-03-09 22:59:22
MySQL8.0.15的安装与配置---win10

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)
MySQL8.0.15的安装与配置---win10