mysql的zip版的安装与卸载

注意:zip版的安装的数据库在:控制面板\所有控制面板项\管理工具中的odbc数据源里面查找不到,安装不了驱动,如果有这方面需要的,另行安装。
一、MySQL的安装
1、先去官网https://downloads.mysql.com/archives/community/下载对应的版本。
![在这里插入图片描述](https://img-blog.csdnimg.cn/20201102171103244.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80NDc3OTc0NQ==,size_16,color_FFFFFF,t_70#pic_center)
2、将压缩包解压至想要安装的目录下

在这里插入图片描述
3、复制目录下的my-defauilt.ini文件改名为my.ini文件:在这里插入图片描述
4、my.ini文件内容为:

# For advice on how to change settings please see

# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html

# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the

# *** default location during install, and will be replaced if you

# *** upgrade to a newer version of MySQL.

[mysqld]

# Remove leading

# and set to the amount of RAM for the most important data

# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.

# innodb_buffer_pool_size = 128M

# Remove leading

# to turn on a very important data integrity option: logging

# changes to the binary log between backups.

# log_bin

# These are commonly set, remove the

# and set as required.

# basedir = .....

# datadir = .....

# port = .....

# server_id = .....

# 设置3306端口
port = 3306


# 设置mysql的安装目录
basedir = E:\Program Files (x86)\mysql-5.7.17-win32


# 设置mysql数据库的数据的存放目录
datadir = E:\Program Files (x86)\mysql-5.7.17-win32\data


# 允许最大连接数
max_connections = 200


# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server = utf8


# 创建新表时将使用的默认存储引擎
default-storage-engine = INNODB

 

# Remove leading

# to set options mainly useful for reporting servers.

# The server defaults are faster for transactions and fast SELECTs.

# Adjust sizes as needed, experiment to find the optimal values.

# join_buffer_size = 128M

# sort_buffer_size = 2M

# read_rnd_buffer_size = 2M

 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

5、新增系统变量:  MYSQL_HOME : 你的MySQL解压目录
6、配置Path环境变量:在Path中添加:%MYSQL_HOME%\bin,如果是WIN7
在Path中添加:;%MYSQL_HOME%\bin;。
7、管理员身份运行cmd,从控制台进入到MySQL解压目录下的 bin 目录下
8、输入命令:mysqld --initialize-insecure
该命令是初始化数据库得到data目录,执行完之后你会发现data中生成了一些文件
9、执行命令:net start mysql 启动MySQL服务
10、登录MySQL: mysql -uroot -p,首先是没有密码的
11、修改密码:set password for root@localhost = password(‘123456’);
二、MySQL的卸载,仅针对此方法安装
1、在服务中停止mysql

在这里插入图片描述
2、打开cmd,切换到mysql安装目录bin目录下,输入
sc delete mysql //这里的mysql是你要删除的服务名
即可删除mysql服务。
3、删除之前配置的MYSQL_HOME 与Path中的:%MYSQL_HOME%\bin
4、删除MySQL的安装文件即可。

  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值