当前位置:网站首页>MySQL解压版windows安装
MySQL解压版windows安装
2022-07-29 05:10:00 【薇森】
一、MySQL安装
到官网 https://dev.mysql.com/downloads/mysql/ 根据自己所需选择下载zip安装包,这里我下载的是mysql-5.7.38-winx64版本。
下载完成后,解压到自己想安装的路径目录下 ,如下图所示。

二、相关配置
1.进行环境变量的配置,右键电脑--------属性------高级系统设置-------环境变量-----系统变量-----------path,将mysql的bin目录(D:\mysql-5.7.38-winx64\bin)添加进path即可,如图所示。

2.在安装mysql的根目录下,新建mysql.ini文件(.ini文件是window里面的配置文件,保存里面各种默认的数据),打开mysql.ini文件将下面基本配置信息复制到该文件,点击保存。
[mysqld]
port = 3306
basedir=D:\mysql-5.6.35-winx64
datadir=D:\mysql-5.6.35-winx64/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 3.新建一个data文件夹,用于存放数据库数据。
三、注册服务
1.以管理员身份进入命令提示符,进入安装mysql的bin目录(其实也无需进入安装目录,因为之前配置过环境变量),如下所示。

2.输入mysqld --initialize-insecure --user=mysql回车没有任何提示反应。
3.输入 mysqld -install 回车,安装成功,如图所示。如果是安装过的,通过 mysqld -remove 进行卸载。

4.然后通过 net start mysql 启动服务,通过 net stop mysql 停止服务,如下图如下。

5.服务启动成功之后,需要登录的时候输入命令(第一次登录没有密码,直接按回车过),使用mysql -u root -p,直接回车,如下图所示:

6.命令 exit 退出,关闭cmd窗口是无法退出的,必须exit才行。

7.修改密码,需要先启动mysql,执行命令 mysqladmin -u root -p password 回车,enter password也回车,然后设置并确认自己的密码,回车即修改成功。

四、mysql 连接工具
1.navicat

点击连接新建一个连接 ,填入连接名,用户名,密码即可连接。
利用navicat 修改密码,操作:点击用户选中,然后[email protected],在下图常规处输入你设置或者修改的密码。

密码填写后,点击sql预览,我们看到自己修改密码的语句,最后点击保存按钮,则密码设置成功 。

2.MySQLWorkbench
主界面如下:

创建连接登录成功后,界面如下:

边栏推荐
- One dimensional array exercise
- 【C语言系列】—文件操作详解(上)
- Differences between texture2d and texture2dproj under webgl1.0
- [C language series] - print prime numbers between 100 and 200
- Detailed explanation of serial port communication
- Solution: find the position of the first and last element in a sorted array (personal notes)
- 三次握手四次挥手针对面试总结
- 存储类别
- 重绘与回流的关系
- 167. Sum of two numbers II - enter an ordered array
猜你喜欢

Clickhouse learning (XI) clickhouseapi operation

【C语言系列】—深度解剖数据在内存中的存储(二)-浮点型

虚拟增强与现实第二篇 (我是一只火鸟)

Clickhouse learning (x) monitoring operation indicators

Alibaba cloud architect details nine trends in the game industry

Global components component registration

Clickhouse learning (VIII) materialized view

ClickHouse学习(六)语法优化

ClickHouse学习(四)SQL操作

Day 5
随机推荐
实现简单的数据库查询(不完整)
One dimensional array exercise
【C语言系列】— 字符串+部分转义字符详解+注释小技巧
C语言 一维数组
Day 5
Day 2
href与src的区别
Day 2
终端shell常用命令
Clickhouse learning (V) cluster operation
ClickHouse学习(五)集群操作
On Paradigm
【C语言系列】— 一道递归小题目
省市区三级联动(简单又完美)
【C语言系列】—三种方法模拟实现strlen库函数的方法
Together with digital people, digital space and XR platform, Alibaba cloud and its partners jointly build a "new vision"
Summary of the first week
167. Sum of two numbers II - enter an ordered array
Application of Huffman tree and Huffman coding in file compression
js深拷贝-笔记