当前位置:网站首页>MySQL 安装
MySQL 安装
2022-07-17 22:13:00 【xjyq】
一、下载
1、地址:https://dev.mysql.com/downloads/mysql/
2、当前最新是8.0版本,我选择上一个最新的mysql-5.7.24-winx64.zip
二、安装
1、MySQL安装文件分两种 .msi和.zip ,.msi需要安装。
2、zip格式是自己解压,解压缩之后其实MySQL就可以使用了,但是要进行环境变量配置zip格式是自己解压。
3、我的电脑->属性->高级->环境变量
选择Path,在其后面添加: 你的mysql bin文件夹的路径 :
F:\mysql\mysql-5.7.24-winx64\mysql-5.7.24-winx64\bin;
4、配置完环境变量之后,在F:\mysql\mysql-5.7.24-winx64\mysql-5.7.24-winx64目录下新增加一个配置文件mysql.ini ,同时在bin的同级目录下创建一个data文件夹(用于存放数据库数据)
5、mysql.ini文件的内容如下:
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=F:\mysql\mysql-5.7.24-winx64\mysql-5.7.24-winx64
# 设置mysql数据库的数据的存放目录
datadir=F:\mysql\mysql-5.7.24-winx64\mysql-5.7.24-winx64\data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
6、打开cmd,不需要进入安装目录(∵之前配置过环境变量),输入下面命令,回车,没有反应
mysqld --initialize-insecure --user=mysql
7、输入下面命令,回车,会提示安装成功
mysqld install
8、启动服务,输入如下命令,回车,启动成功后如下图
net start mysql
9、服务启动成功之后,需要登录的时候输入命令(第一次登录没有密码,直接按回车过)
mysql -u root -p
10、修改密码(必须先启动mysql),执行如下命令回车,enter password也回车,密码一般设置为root,方便记忆
mysqladmin -u root -p password
11、退出exit 就行了,记住直接关闭cmd窗口是没有退出的,要输入exit才会退出啊
————————————————
引用参考:
https://blog.csdn.net/weixin_42869365/article/details/83472466
边栏推荐
- Read the paper: temporary graph networks for deep learning on dynamic graphs
- Principle and simple implementation of custom MVC
- OSError: sndfile library not found 解决方案
- 暑期第三周总结
- Comparaison de deux types de machines virtuelles
- Authing practice | unified management solution for manufacturing identity authentication
- Common built-in functions, iteratable objects, iterator objects, exception capture, purpose of exception capture, generator objects, modules, absolute and relative imports, package concepts, modules
- 数据填报、报表展示哪家强?亿信ABI给你答案
- Code runner for vs code, with more than 40million downloads! Support more than 50 languages
- SQL wrong questions set of Niuke brush questions
猜你喜欢
The first step of agile: turn "iteration" into "sprint" and start!
ospf 附录 防环 重发布
Alibaba微服务组件Nacos注册中心
MySQL index (I)
Preview of authtalk phase I | comprehensive dismantling of multi tenant solutions
Google Earth Engine——无人机影像进行分类处理
数据填报、报表展示哪家强?亿信ABI给你答案
The bill module of freeswitch
Zabbix实现对Redis的监控
见鬼,U盘空间怎么少了,原来是EFI分区搞的鬼,删除它
随机推荐
PCIe Cameralink signal generator (Cameralink image analog source)
UCAS. Deep learning Final review knowledge points summary notes
[Luogu p3220] and not (construction) (digit DP) (inference)
Mvcc multi version concurrency control
现在网上办理基金开户,身份证信息安全吗?
ospf-LSA
One article, teach you to achieve single sign on
国内顶尖专家集聚广州,探讨健康医疗数据安全应用
Cilium & Hubble
The first step of agile: turn "iteration" into "sprint" and start!
Redis 与 Mysql 的数据一致性
Authing practice | unified management solution for manufacturing identity authentication
ORA-08103
Classification of interrupts
009 面试题 SQL语句各部分的执行顺序
暑期第三周总结
Can [C language - user defined type] be adjusted like this?
状态机练习
Force deduction 912 sorting array notes
Compositionapi component development paradigm