Home  >  Article  >  Database  >  mysql5.7.21.zip installation example tutorial

mysql5.7.21.zip installation example tutorial

小云云
小云云Original
2018-02-02 11:21:171442browse

This article mainly introduces the mysql5.7.21.zip installation tutorial in detail. It has certain reference value. Interested friends can refer to it. I hope it can help everyone.

The detailed process of mysql5.7.21 zip installation is as follows

1. Unzip and place it in the specified disk D:\mysql-5.7.21-winx64

2. Create a new my.ini file and place it in the D:\mysql-5.7.21-winx64 folder. Put the following code into the my.ini file

basedir and datadir. Please follow your actual installation directory. Make modifications


[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=D:\mysql-5.7.21-winx64
# 设置mysql数据库的数据的存放目录
datadir=D:\mysql-5.7.21-winx64\data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
#开启查询缓存
explicit_defaults_for_timestamp=true
skip-grant-tables
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB

3. Configure environment variables

MYSQL_HOME:D:\mysql-5.7.21-winx64

Add;%MYSQL_HOME%\bin after the system environment path. Friends who are not win10 should pay attention to adding a semicolon (";")

4. Open cmd.exe, you must use management Run as a user


mysqld --initialize --user=mysql --console

5. Install the service


mysqld --install MySQL5.7.21

6.

Start the service


net start MySQL5.7.21

Stop the service


# #

net stop MySQL5.7.21

7. After logging in with the initial password, execute the following command to change the password


set password for root@localhost=password('你的密码');

If the password modification fails, please execute flush privileges first; and then perform the modification.

Related recommendations:


Detailed steps to install MySql5.7.21 in Linux

The above is the detailed content of mysql5.7.21.zip installation example tutorial. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn