当前位置:网站首页>MySql的开发环境
MySql的开发环境
2022-06-27 03:27:00 【洛洛虎虎生威】
hello,家人们,今天教大家用命令提示符安装MySql,哈哈,跟着我的步骤一步一步来,很容易的,加油!
目录
一.安装mysql5.7.23解压版
1.先在官网下载,然后我们得到的会是一个压缩包,接着我们需要把压缩包全部解压,然后就会是这样

因为我这里的文件夹是安装在E盘的,所以就直接拿我这个举例吧.
2.配置环境变量:
MYSQL_HOME E:\MySql\mysql-5.7.23-winx64
先打开设置

然后打开系统

然后点击右边的高级系统设置

就会进入到上面这个界面,然后点击高级,选择下面的环境变量选项

注:最好在系统变量中配置环境变量
3.编辑path
%MYSQL_HOME%\bin
4.新建my.ini
新建my.ini ,放到MySql文件夹下
[mysqld]
port = 3306
basedir=E:\MySql\mysql-5.7.23-winx64
datadir=E:\MySql\mysql-5.7.23-winx64/data (如果文件目录中有data文件,在这之前删掉)
max_connections=200
character-set-server=utf8
default-storage-engine=INNODB
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[mysql]
default-character-set=utf8

说明:
sql_mode
NO_ENGINE_SUBSTITUTION:mysql 在create table 时可以指定engine子句
STRICT_TRANS_TABLES:对于单个insert操作,无论插入单行或是多行,只要插入数据与字段类型不兼容,则insert操作失败并回滚
与mysql最接近的是mariadb
然后我们为了防止安装错误,利用我们系统中的注册编辑表,然后进入按下导出,然后我们就会生成一个后缀名为.reg的文件,如果到时候MySql不小心装歪了,或者说装失败了,就可以把这个目录删掉,可以保存里面有用的数据剪切一下,然后重新打开我们的注册编辑表,然后把我们之前导出的那个文件重新导入进来,然后重新初始化
好,现在我们开始运用命令提示符操作,先打开cmd命令,然后右击命令提示符,选择以管理员身份运行
需要进入bin目录:
5.安装
mysqld -install

6.初始化
mysqld --initialize-insecure --user=mysql
根据刚刚my.ini文件去初始化,然后会产生一个data文件夹
7.启动
net start mysql

8.设置密码
mysqladmin -u root -p password 新密码

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

10.连接
mysql -u root -p

11.测试
显示数据库 show databases;
显示表 show tables;
二、卸载mysql
1 停止服务
net stop mysql
2.删除服务
sc delete mysql 但是服务只是禁用状态,服务还是存在
3.移除服务
mysqld remove 需要进入bin目录,在服务中已经找不到mysql服务了
4.删除注册表信息
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL
- HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\MySQL
- HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL
5.删除mysql的安装目录
打开注册表
regedit
打开服务
services.msc
注意1:有保护关闭,特别是自我保护要关闭,不然没法卸载
注意2:权限问题
三:解决mysql不能远程连接的问题:
1. 在mysql服务器上进入 mysql的命令行
2. 执行如下语句: (注意密码需要根据自己的配置修改)
mysql> grant all privileges on *.* to [email protected]'%' identified by '123456';
mysql> flush privileges;
今天的知识就到这里啦~ 哈哈,咱们下期见
今天也要记得微笑呀.
边栏推荐
- How does the brain do arithmetic? Both addition and subtraction methods have special neurons, and the symbol text can activate the same group of cell sub journals
- 2021:Graphhopper: Multi-Hop Scene Graph Reasoning for Visual Question Answering
- Brief introduction of 228 dropout methods of pytorch and fast implementation of dropblock with 4 lines of code based on dropout
- fplan-Powerplan实例
- 1. Project preparation and creation
- docker部署redis集群
- 2020:MUTANT: A Training Paradigm for Out-of-Distribution Generalizationin Visual Question Answering
- Learn Tai Chi Maker - mqtt (VIII) esp8266 subscribe to mqtt topic
- 2016Analyzing the Behavior of Visual Question Answering Models
- 2022 operation of simulated examination platform for tea artist (Senior) work license question bank
猜你喜欢

Pat grade a 1023 have fun with numbers

2021:passage retrieval for outside knowledgevisual question answering

Il manque beaucoup de fichiers et de répertoires tels que scripts pendant et après l'installation d'anaconda3

2020:MUTANT: A Training Paradigm for Out-of-Distribution Generalizationin Visual Question Answering

Pat grade a 1026 table tennis

PAT甲级 1021 Deepest Root

I found a JSON visualization tool artifact. I love it!

元透实盘周记20220627

docker部署redis集群
![[micro service sentinel] degradation rules slow call proportion abnormal proportion abnormal constant](/img/4d/4d4424b609a3c0cd36c5c79daa8861.png)
[micro service sentinel] degradation rules slow call proportion abnormal proportion abnormal constant
随机推荐
Resnet152 pepper pest image recognition 1.0
PAT甲级 1018 Public Bike Management
JMeter distributed pressure measurement
How does source insight (SI) display the full path? (do not display omitted paths) (turn off trim long path names with ellipses)
流沙画模拟器源码
GAMES101作业7提高-微表面材质的实现过程
TP5 spreadsheet excel table export
IDEA中好用的插件
Implementation of window encryption shell
解码苹果手机证书文件方法
【数组】剑指 Offer II 012. 左右两边子数组的和相等 | 剑指 Offer II 013. 二维子矩阵的和
超级详细,2 万字详解,吃透 ES!
docker部署redis集群
通信中的机器学习最佳阅读资料列表
Yiwen teaches you Kali information collection
Paddlepaddle 21 is implemented based on dropout with 4 lines of code droplock
语义化版本 2.0.0
QIngScan使用
栈溢出漏洞
[Shangshui Shuo series] day 6

