Files
course/data.md
王鹏 5597ca12de init
2025-08-14 14:46:45 +08:00

39 lines
1.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

如果已经安装mysql请忽略此步骤
#### 下载mysql
- 开发环境 → 百度云盘
- [官网下载](https://dev.mysql.com/doc/relnotes/mysql/5.7/en/)
#### 安装步骤
参考百度经验,详细到每一步的图文教程。
[百度经验](https://jingyan.baidu.com/article/76a7e409180390fc3b6e15af.html)
安装完一定记住密码,很重要。
#### 忘记密码
1. 新建my.ini文件或修改my-default.ini文件
2. `skip-grant-tables` 跳过密码验证登录,安装路径需要更改
```
[mysqld]
basedir=D:\Program Files\mysql-5.7\
datadir=D:\Program Files\mysql-5.7\data\
port=3306
skip-grant-tables
```
3. 启动管理员模式下的cmd
4. 启动mysql,利用命令 `mysql -uroot -p`登录,不需要密码即可登录
5. 登录成功后更改root密码
6. `use mysql`切换到mysql数据库
7. `update user set password = password('123456') where user='root' and host='localhost';`修改root密码
8. `flush privileges`刷新权限
9. 修改my.ini 文件删除 `skip-grant-tables`
10. 重启mysql即可正常使用 `net stop mysql and net start mysql`