当前位置:网站首页>利用cmd(命令提示符)安装mysql&&配置环境
利用cmd(命令提示符)安装mysql&&配置环境
2022-06-25 12:14:00 【xiongᥫᩣ】
目录
一,解压
大家可以从网上下载mysql的压缩包用于安装,下载好压缩包后第一步首先解压。
二,配置环境变量
1.找到桌面上的此电脑,右键选择属性

2.进入设置过后,下滑点击高级系统设置

3.进入高级系统设置后点击环境变量

4.点击新建,增加一个系统变量

5.变量名直接用 MYSQL_HOME 变量值就用你的mysql文件夹的存放位置

三,编辑path
1.在系统变量中找到 Path

2.双击进入 Path 点击新建添加一个环境变量

四,新建my.ini
1.将文件复制粘贴至MySQL文件夹中去

2.右键点击编辑,将里面的默认路径替换为你存放MySQL文件夹的路径

以下操作需先进入bin目录中
五,安装
win+r 输入 cmd 进入命令提示符中去,再进入到bin目录中去
以下是博主的代码:
C:\Users\Administrator>f:
F:\>cd mysql5.7
F:\mysql5.7>cd mysql-5.7.23-winx64
F:\mysql5.7\mysql-5.7.23-winx64>cd bin
F:\mysql5.7\mysql-5.7.23-winx64\bin>

再输入以下代码进行MySQL的安装
mysqld -install
六,初始化
根据刚刚my.ini文件去初始化,然后会产生一个data文件夹
mysqld --initialize-insecure --user=mysql

七,启动
在cmd中输入以下代码,用去启动MySQL
net start mysql
打开任务管理器此时可以看到已经有MySQL的存在了

八,设置密码
在password后面输入新密码,然后点击enter进行下一步
mysqladmin -u root -p password 新密码

Enter password: 旧密码 直接回车,因为初始化直接把mysql的密码设置为空 ,所以初次的旧密码为空

九,连接
在cmd中输入以下代码:
当发现数据库可以显示后,就代表已经MySQL已经安装成功了
连接 mysql -uroot -p ;
显示数据库 show databases;
显示表 show tables;
今天的知识分享就到此为止啦,精彩下期继续!有问题可以在评论区留言或私信博主哦
边栏推荐
- Polling and long polling
- yolov5训练使用的负样本图片
- Figure explanation of fiborache sequence
- Methods of strings in JS charat(), charcodeat(), fromcharcode(), concat(), indexof(), split(), slice(), substring()
- ECSHOP video list_ ECSHOP uploading video, video classification, video list playing video function
- PHP replaces the key of a two-dimensional array with a specified element value
- 微信全文搜索技术优化
- Error while sending STMT_ PREPARE packet. PID=29294
- Huile optimization system -- sharing of secondary development source code of huile optimization app system
- The source code of the hottest online disk money making system in 2022 imitates Lanzou online disk / Chengtong online disk / sharing money making cloud disk system / online disk VIP Download System
猜你喜欢

The server reported an error 503 service unavailable:the system returned: (71) protocol error

ECSHOP commodity page multi-attribute batch purchase plug-ins ECSHOP wholesale plug-ins multi-attribute order placing, multi-attribute batch purchase of commodities

聊聊高可用的 11 个关键技巧
![[Visio]平行四边形在Word中模糊问题解决](/img/04/8a1de2983d648e67f823b5d973c003.png)
[Visio]平行四边形在Word中模糊问题解决

Today, I will explain to you what is DFI and its development prospects

更新pip&下载jupyter lab

冷启动的最优解决方案

三入职场!你可以从我身上学到这些(附毕业Vlog)

Guess Tongyuan B

2021-10-21
随机推荐
Penetration tool environment - Installation of sqlmap
Zhangxiaobai's road of penetration (VI) -- the idea and process of SQL injection and the concat series functions and information of SQL_ Schema database explanation
ECSHOP quickly purchases goods, simplifies the shopping process, and improves the user experience through one-step shopping
画图常用配色
Micro engine generates QR code
Render values to corresponding text
Laravel excel export
Thinkphp3 count ` *'problem
百度搜索稳定性问题分析的故事
(5) Pyqt5 ---- another method of connecting signals and slots
Write regular isosceles triangle and inverse isosceles triangle with for loop in JS
Service charge and time setting code sharing involved in crmeb withdrawal process
JS SMS countdown implementation (simple code)
Polling and long polling
Why are databases cloud native?
Qiantang Pingou source code -- Qiantang Pingou app system development source code sharing
Zhangxiaobai's way of penetration (VIII) - detailed operation steps of SQL injection - Boolean blind injection of blind injection
Possible causes of wechat applet decryption failure
ECSHOP commodity page multi-attribute batch purchase plug-ins ECSHOP wholesale plug-ins multi-attribute order placing, multi-attribute batch purchase of commodities
Laravel multi project mutual access