岁月如歌,,,|

千夜ん

园龄:5年11个月粉丝:0关注:0

MySQL 5.7 安装

MySQL安装

1 下载解压版文件

image-20230501100248192

2 配置环境变量

image-20230501100720832

3 新建my.ini文件

image-20230501100922264

[client]
port=3306
default-character-set=utf8
[mysqld]
# 设置为自己的mysql的安装目录
basedir=D:\Mysql\mysql-5.7.19-winx64\
#设置为mysql的数据目录
datadir=D:\Mysql\mysql-5.7.19-winx64\data\
port=3306
character_set_server=utf8
#跳过安全检查
skip-grant-tables

4 管理员打开cmd

image-20230501102309033

image-20230501102928833

5 初始化数据库

mysqld --initialize-insecure --user=mysql

image-20230501103450883

image-20230501103633839

image-20230501103815373

6 启动MySQL

net start mysql //开启服务
net stop mysql //停止服务

image-20230501104042294

7 进入MySQL

mysql -u root -p

image-20230501104344147

8 修改root密码

use mysql;
update user set authentication_string=password('xx') where user='root' and Host='localhost';
注意:最后需要带分号,回车执行指令
flush privileges;//刷新权限

image-20230501105051233

9 删除跳过安全检查

image-20230501105313532

10 重启服务

net stop mysql
net start mysql

image-20230501105559433

安装结束

本文作者:岁月如歌,,,

本文链接:https://www.cnblogs.com/fengpeng123/p/17367020.html

版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。

posted @   千夜ん  阅读(46)  评论(0编辑  收藏  举报
点击右上角即可分享
微信分享提示
评论
收藏
关注
推荐
深色
回顶
收起