MySQL Windows installation MySQL5.7 free installation configuration tutorial tutorial Windows installation MySQL5.7 free installation

MySQL Windows installation MySQL5.7 free installation configuration tutorial tutorial Windows installation MySQL5.7 free installation

 

First, download MySQL

1, free installation Download: https://dev.mysql.com/downloads/mysql/

2, install version download: https://dev.mysql.com/downloads/windows/installer/5.7.html

3, free installation to install version:

 

 

Second, free installation configuration

1, extract the downloaded ZIP archives give installation package path:  C: \ the MySQL \ MySQL 5.7.16-

 

2, in the installation package, add my.ini profile, as follows:

[mysql]

[mysqld]
#设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=C:\MySQL\mysql-5.7.16
# 设置mysql数据库的数据的存放目录
datadir=C:\MySQL\mysql-5.7.16\data
# 允许最大连接数
max_connections=200
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB

# sql_mode
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

# server_id 唯一标识,一台电脑安装多个MySQL配置
server_id=mysql3306

 

3, the installation MySQL: open cmd command window (win + R), the input cmd, enter the C: \ \ mysql-5.7.16 MySQL  \ bin directory, execute the command: mysqld the install carriage to complete the installation.

 

4, initialization data directory:

  • Create a data directory, C: \ MySQL \ MySQL-5.7.16 \ data
  • Initialized with a password: mysqld --initialize
  • View initialize Password: data directory, .err file, Soso " the Temporary password

 

5, start the MySQL service: NET Start MySQL

5.1, stop the MySQL service: NET STOP MySQL

6, landing MySQL: MySQL-uroot--p

7, modify the password: the ALTER the User 'root' @ 'localhost' IDENTIFIED by " yourpassword ";

8. Refresh: flush privileges;

9, quit quit, try to log in with the new password to verify the change was successful!

10, open telnet: GRANT ALL PRIVILEGES ON * * the TO 'root' @ '%' IDENTIFIED BY '. Yourpassword ' the WITH GRANT OPTION;

 

Third, the possible problems

1, the service is starting or stopping in, please wait a moment and try again.

2, install mysql service appeared Install / Remove of the Service Denied! Error

3、mysqld: Can't create directory 'E: xxx\data\' (Errcode: 2 - No such file or directory)

 

Reference: MySQL version history download

                   Installation Guide MySQL80 CentOS installation diagram MySQL8.0

                    Delete MySQL Service 

 

 

 

 

Published 156 original articles · won praise 159 · views 490 000 +

Guess you like

Origin blog.csdn.net/HaHa_Sir/article/details/103547794