下载安装包:「mysql(cmd版)」等文件 https://www.aliyundrive.com/s/Tz7hWPD1vx5 点击链接保存,或者复制本段内容,打开「阿里云盘」APP ,无需下载极速在线查看,视频原画倍速播放。
下载安装步骤文件:「MySQL(cmd版).docx」https://www.aliyundrive.com/s/i62z1TcXjhS
MySQL(桌面图标版)下载安装步骤文件.docx」:https://www.aliyundrive.com/s/p2YDayUmN8u
(要以管理员身份运行,有些人的电脑在安装mysql -,过程中出现启动失败)
C:\Users\>cd \ ///切换到根目录
C:\>d: /// 切换到D盘(因为我将mysql-8.0.17-winx64安装在D盘)
D:\>dir /// 打开D盘目录
驱动器 D 中的卷是 Data
卷的序列号是 FEC4-3412
D:\ 的目录
2022/05/20 19:53 <DIR> AppGallery
2022/08/02 16:57 <DIR> Brower Download
2022/06/28 23:36 <DIR> HONOR Magic-link
2022/08/02 17:34 <DIR> mysql-8.0.17-winx64
2022/06/06 18:19 <DIR> XueXi
0 个文件 0 字节
5 个目录 128,524,464,128 可用字节
D:\>cd mysql-8.0.17-winx64/bin ///切换到bin目录下
D:\mysql-8.0.17-winx64\bin>mysqld --install ///安装
The service already exists!
The current server installed: D:\mysql-8.0.17-winx64\bin\mysqld MySQL
D:\mysql-8.0.17-winx64\bin>mysqld --initialize --user=mysql ///初始化
D:\mysql-8.0.17-winx64\bin>net start mysql ///启动服务
MySQL 服务正在启动 .
MySQL 服务已经启动成功。
D:\mysql-8.0.17-winx64\bin>mysql -u root -p ///登录命令
Enter password: ************ ///第1次登录,密码在D:\mysql-8.0.17-winx64\data找到“err文件 即错误文件”,密码在该文件第2行后面
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.17
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 '123'; ///要有分号(英文),引号的“123”就是我要修改的密码
Query OK, 0 rows affected (0.01 sec)
实现具体图片: