1.官网下载文件
2.解压放到你要安装的目录下
3.cmd 管理员模式打开,切换到bin目录下
D:\mysql-8.0.19-winx64\bin>mysqld --installService successfully installed.D:\mysql-8.0.19-winx64\bin>
mysqld --defaults-file="D:\mysql-8.0.20-winx64\bin\my.ini" --console --skip-grant-tables
D:\mysql-8.0.20-winx64\bin>mysqld --initialize >>>会在data 路径下.err文件下生成随机密码D:\mysql-8.0.20-winx64\bin>mysqld --installService successfully installed.D:\mysql-8.0.20-winx64\bin>net start mysqlMySQL 服务正在启动 .MySQL 服务已经启动成功。D:\mysql-8.0.20-winx64\bin>mysql -u root -pEnter password: ************ 》》》在.err文件下生成随机密码中zhao找Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 8Server version: 8.0.20Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql>>>>>修改密码,注意‘:’mysql> alter user user() identified by "你的密码";》》》我的是123456Query OK, 0 rows affected (0.06 sec)mysql>
