MySQL download and install Photo

A. MySQL download


1. Go to the MySQL official website
official website address: https://www.mysql.com/

2. Click DOWNLOADS

Write pictures described here
3. Click the Community (GPL) Downloads

Write pictures described here
4. Locate the MySQL Community Server, click on the following DOWNLOAD, enter the download page

Write pictures described here
5. True to the download page, select the platform, select the version (version installation and free installation version), click Download


6. just downloaded, click No thanks, just start my download. Can

 

Two. MySQL installation configuration


1. Configure my.ini initialization file

Unpacked directory and did not my.ini file, it does not matter you can create your own. Add in the mounted my.ini root (New text file, the file type to .ini), writing the basic configuration: 

[client]
# 设置mysql客户端默认字符集
default-character-set=utf8

[mysqld]
# 设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=D:\mysql
# 设置 mysql数据库的数据的存放目录,MySQL 8+ 不需要以下配置,系统自己生成即可,否则有可能报错
# datadir=D:\mysql\data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB


2.添加环境变量 
右键单击我的电脑->属性->高级系统设置(高级)->环境变量,出现如下界面: 
 
点击系统变量下的新建按钮: 
 

输入变量名:MySQL_HOME
输入变量值:D:\mysql(即为mysql的自定义解压目录)

选择系统变量中的Path,点击编辑->新建 
 

在变量值中添加变量值:%MySQL_HOME%\bin,注意是在原有变量值后面加上这个变量。

 

3.将mysql注册为windows系统服务:

从控制台进入到MySQL解压目录下的 bin 目录下: 

输入服务安装命令:

 

在MySQL安装目录的 bin 目录下执行命令:

mysqld --initialize --console

After a successful installation service will be prompted to install successfully. 

 

note! Execution output with a paragraph: [Note] [MY-010454] [Server] A temporary password is generated root @ localhost for: 9P0gYk- 0, kT where root @ localhost:?? Back 9P0gYk- 0, kT is the initial password (excluding the first space). In the absence of change passwords to remember this password, subsequent logins need to use. Copy the password to be saved! ! !

Note: my.ini file in the root directory of the MySQL decompression, remove service command: mysqld remove

Guess you like

Origin www.cnblogs.com/l199616j/p/11764541.html
Recommended