当前位置:网站首页>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就需要密码了
边栏推荐
- [advanced C language] - analyze the storage of micro data in memory [i]
- MySQL basic queries and operators
- TensorFlow2.0(十一)--理解LSTM网络
- 1.2-进制转换
- MySQL installation
- How to bind idea with code cloud
- [unity scriptable object] tutorial | using scriptable object to store object data information in unity
- @Detailed explanation of requestmapping
- [p5.js actual combat] my self portrait
- PyTorch中grid_sample的使用方法
猜你喜欢

有奖征文 | 2022 云原生编程挑战赛征稿活动开启!

TensorFlow2.0(十二)--实现简单RNN与LSTM网络

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

Complete MySQL interview questions (updated in succession)

2.2-数据类型

.net动态调用webservice的三种方式

IO operation

Collection集合

【Unity】三张图让你看懂ShaderGraph编辑器
![[C language note sharing] character function and string function (recommended Collection)](/img/0a/90cd617e3622d95f9bfc3e945a298a.png)
[C language note sharing] character function and string function (recommended Collection)
随机推荐
[advanced C language] - Advanced pointer [i]
【机器学习笔记】Regularization : Ridge Regression(岭回归)
数字滤波器(四)--模拟滤波器转化为数字滤波器
1.1- notes
webview里面$(document).width()都是一个值
阿里云天池大赛赛题解析(深度学习篇)--阅读笔记1--赛题一
【p5.js】实战练习——无规则对称
Internal class, common class
Prize essay solicitation | the 2022 cloud native programming challenge draft activity is open!
Point cloud processing voxel filter
Encapsulation, inheritance, polymorphism
[C language note sharing] character function and string function (recommended Collection)
【Unity FPS】教程 | 使用Unity制作第一人称角色控制器
Understanding of virtual (virtual method) in C and its difference from abstract (abstract method)
进程、线程、信号量和互斥锁
OpenMV(六)--STM32实现物体识别与手写数字识别
数字滤波器(五)--设计IIR滤波器
【p5.js学习笔记】局部变量(let)与全局变量(var)声明
ROS system installation
OpenMV(四)--STM32实现特征检测
