当前位置:网站首页>MySQL 5.7 installation tutorial (all steps, nanny tutorials)
MySQL 5.7 installation tutorial (all steps, nanny tutorials)
2022-07-30 06:46:00 【m0_67402564】
2022年05月30日更新
本文介绍的是只安装MySQL数据库的过程,Various other additional tools are not included.Usually used after installation is completeNavicat或SQLyog进行可视化操作.
Tsinghua's mirror website only saves the latest fewMySQL版本,So the straight chain may have failed,大家可以使用Ctrl + F进行搜索.
Some users will be prompted that one is missing during installationC++运行库,Below is the official link to one of the runtime libraries,下载x64即可.
https://www.microsoft.com/zh-cn/download/details.aspx?id=40784
Writing a long blog for the first time,So the typography layout was re-adjusted.I hope you can make more suggestions!If there are any unclear or wrong descriptions, please let me know in the comment area in time,I will adjust as soon as possible.
以下为原文内容.
在项目中使用到了MySQL数据库,在安装时踩了很多坑.本文用于记录MySQL安装的全过程.
在项目中使用MySQL数据库+Navicat数据库管理工具.
0、系统环境
系统版本:Windows 10 教育版
版本号:21H2
MySQL版本:5.7.35
1、MySQL安装包下载
MySQL官方网站下载速度太慢,这里推荐使国内的开源镜像站.
清华大学开源软件镜像站 | Tsinghua Open Source Mirror
MySQL的版本有很多,这里只安装纯粹的MySQL数据库,不附加任何工具.
Index of /mysql/downloads/MySQL-5.7/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
在列表中找到 mysql-5.7.35-winx64.msi 进行下载.

直接下载链接:mysql-5.7.35-winx64.msi
2、MySQL 5.7.35 安装过程
(1)双击启动安装包,点击Next进入下一步.

(2)勾选 I accept the terms in the License Agreement ,同意协议,点击Next进入下一步.

(3)点击第二个 Custom自定义安装,自定义安装路径.
Typical:典型安装,安装最常用的功能,默认安装在C盘.
Custom:自定义安装,选择安装路径和组件等.
Complete:完全安装,安装所有组件,默认安装在C盘.

(4)点击右下角的Browse…,设置安装路径.

(5) 将Folder name改为自定义的安装路径.可以直接将盘符C改为D,快速调整路径.也可以直接使用默认的C盘.调整完毕后点击 OK .

(6)修改之后的安装路径.点击 Next .

(7)点击 Install ,开始安装.

(8)安装完成后,点击 Finish结束.

3、MySQL环境变量配置
(1)在系统属性中,点击环境变量.

(2)找到环境变量—>系统变量—>Path,选中后点击编辑.

(3)在PathClick New in Environment Variables,将之前设置的安装目录添加进去.如果安装在D盘,环境变量配置如下.Must be added laterbin目录!!!

确定修改,返回,环境变量配置完成.
4、MySQLService installation and initial login
(1)以管理员身份启动命令提示符,一定要是管理员身份!!!

(2)定位到安装目录的bin目录下.

(3)执行命令 mysqld -install和mysqld --initialize.
mysqld -install
After the first command is executed,输出Service successfully installed.
mysqld --initialize
After the second command is executed,没有输出,back to the cursor.

(4)After the two commands are executed,在MySQLwill appear in the installation directorydata文件夹.

在dataOne of the folders starts with **.err**结尾的文件.

用记事本打开.err文件,A temporary password for the database is stored in the file.You can also use Notepad's Find feature to find keywordspassword.记住此密码!!!

(5)执行命令 net start mysql,启动MySQL服务.

(6)Log in for the first time using a temporary passwordMySQL.登录命令为mysql -u root -p.**密码就是.errTemporary password in the file!**登录成功.
mysql -u root -p


(7)修改root用户的登录密码为123456.
alter user 'root'@'localhost' identified by '123456';

使用quit命令退出MySQL.
5、修改MySQL字符集为utf8
(1)在MySQLCreate a new file in the installation directory my.ini .文件内容为:
[client]
default-character-set=utf8
[mysql]
default-character-set=utf8
[mysqld]
character-set-server=utf8

(2)以管理员身份启动命令行,重启MySQL服务.
net stop mysql
net start mysql

(3)登录MySQL,使用命令status查看字符集.由于配置了环境变量,You can log in directly using the normal command lineMySQL.

The character set is all changed to utf8.
以上就是MySQL安装的全过程,Recommend mates in the projectNavicat使用.
先自我介绍一下,小编13年上师交大毕业,曾经在小公司待过,去过华为OPPO等大厂,18年进入阿里,直到现在.深知大多数初中级java工程师,想要升技能,往往是需要自己摸索成长或是报班学习,但对于培训机构动则近万元的学费,着实压力不小.自己不成体系的自学效率很低又漫长,而且容易碰到天花板技术停止不前.因此我收集了一份《java开发全套学习资料》送给大家,初衷也很简单,就是希望帮助到想自学又不知道该从何学起的朋友,同时减轻大家的负担.添加下方名片,即可获取全套学习资料哦
边栏推荐
- Bypassing the file upload vulnerability
- js基础 判断数据类型
- C#中使用OleDb操作access数据库
- Remember a traffic analysis practice - Anheng Technology (August ctf)
- 3 minutes to tell you how to become a hacker | Zero foundation to hacker introductory guide, you only need to master these five skills
- Extraction of BaseDAO
- TDengine集群搭建
- CTFSHOW command execution [web29-web124] unfinished to be continued
- MySQL 5.7 安装教程(全步骤、保姆级教程)
- 国内数字藏品交易平台开发市场会开放二级市场吗
猜你喜欢
随机推荐
根据ip地址获取地理位置及坐标(离线方式)
记一次流量分析实战——安恒科技(八月ctf)
promise的基本概念
sqli-labs less3/4 Targeting Notes
Request请求体重新封装,解决请求体只能获取一次的问题
Flink CDC 实现Postgres到MySQL流式加工传输案例
mysql删除表中重复数据,(只保留一行)
C#中使用OleDb操作access数据库
【墨者学院】身份认证失效漏洞实战
uni-app使用npm命令安装组件
Misc of CTF-image steganography
FastAPI Quick Start
【SQL】first_value 应用场景 - 首单 or 复购
3分钟告诉你如何成为一名黑客|零基础到黑客入门指南,你只需要掌握这五点能力
The most powerful and most commonly used SQL statements in history
DVWA installation tutorial (understand what you don't understand · in detail)
Invalid bound statement (not found)出现的原因和解决方法
SSTI range
Detailed MySQL-Explain
MySQL开窗函数





