当前位置:网站首页>mysql5.7压缩包安装教程
mysql5.7压缩包安装教程
2022-07-28 16:37:00 【摩尔多0】
1.下载mysql压缩包
https://downloads.mysql.com/archives/community/
选择你要下载的版本

将下载的压缩包解压并新建data文件夹和my.ini文件

在my.ini里面编写配置文件
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=D:\mysql-5.7.32-winx64
# 设置mysql数据库的数据的存放目录
datadir=D:\mysql-5.7.32-winx64\data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
#无密码登录
skip-grant-tables

配置mysql环境变量

配置mysql
输入
mysqld --initialize
mysqld -install
net start mysql

修改密码
第一种方法:以配置文件的方式开启无密码登录
mysql -u root -p
因为在my.ini里面配置了无密码登录,所以这里不需要输入密码
进入mysql
use mysql
update mysql.user set authentication_string=password('123456') where user='root';

退出cmd,并将my.ini里面的无密码登录注释掉

第二种方法:通过命令开启无密码登录
(1) 停止服务net stop mysql
(2) 输入mysqld --skip-grant-tables开启无密码的MySQL服务。这个时候,光标会一直闪。注意,不要动,打开另一个命令行窗口。
(3) 在新的dos窗口输入命令:mysql –u root –p 密码(默认密码为root)直接回车。登录成功。
进入mysql
use mysql
update mysql.user set authentication_string=password('123456') where user='root';
重启服务
net stop mysql
net start mysql
重新进入mysql就需要密码了
边栏推荐
猜你喜欢

Mysql 优化总结

ps快速制作全屏水印

2022 idea (student email authentication) installation and use tutorial and basic configuration tutorial

abstract、static、final

数字滤波器(四)--模拟滤波器转化为数字滤波器
![[unity] timeline learning notes (VII): Custom clip](/img/25/0402a28539cb568d5a539a757b2482.png)
[unity] timeline learning notes (VII): Custom clip

Point cloud processing -- binary tree

【p5.js学习笔记】码绘的基础知识
![[machine learning notes] regularization: ridge regression](/img/94/9d1e126554fac0713937381253f9c9.png)
[machine learning notes] regularization: ridge regression

Please make sure you have the correct access rights and the repository exists.
随机推荐
域名解析问题记录
【Unity】Sprite九宫格到底怎么玩?
[阅读笔记] For:Object Detection with Deep Learning: The Definitive Guide
[p5.js learning notes] local variable (let) and global variable (VaR) declaration
mmdetection3d(2)---结果、log可视化
Please make sure you have the correct access rights and the repository exists.
The solution to the problem that the computer cannot be charged
MySQL的安装
Use of multithreading
[p5.js actual combat] my self portrait
[p5.js learning notes] basic knowledge of code drawing
IDEA报错Error running ‘Application‘ Command line is too long解决方案
OpenMV(三)--实时获取摄像头图片
[p5.js learning notes] mouse interaction event
[阅读笔记] For Paper:R-CNN系列的三篇论文总结
图像处理代码整理
Ros自定义消息及使用
数字滤波器(六)--设计FIR滤波器
[machine learning notes] regularization: ridge regression
【p5.js学习笔记】码绘的基础知识
