win10 installation mysql5.7.26

The Great God wrote:
https://www.cnblogs.com/ericli-ericli/p/6916285.html
cattle, afraid of what the page is deleted, just copy it, are the source, the god Wuguai

step 1

Download the official website: https://dev.mysql.com/downloads/mysql/

Select manual installation version:

2484217-d20d539f58339bf6.png
image

Mysql to extract the D drive folder:

2484217-f3101d5256fcddb6.png
image

Than the previous version is missing two .ini files directly copy over, modify, my.ini:

Press Ctrl + C to copy the code

[client]
port=3306
default-character-set=utf8

[mysqld] 
# 设置为MYSQL的安装目录 
basedir=D:\\mysql\\mysql-5.7.18-winx64
# 设置为MYSQL的数据目录 
datadir=D:\\mysql\\mysql-5.7.18-winx64\data
port=3306
character_set_server=utf8
sql_mode=NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER
#开启查询缓存
explicit_defaults_for_timestamp=true
skip-grant-tables

Press Ctrl + C Copy the code
(my-default.xml and it may be the same)

Step Two

Set the environment variable:
put your mysql bin directory to which the configuration environment variable


2484217-3463fdc471ce2678.png
image.png

Step Three

Execute as administrator cmd,

Input:

2484217-16fa1a91ef5000ca.png
image

1, into the program storage bin directory
2, mysqld --initialize-insecure
sentence command is to make the data have normal mysql directory folder and related files
look data directory, the file appears below what we need:

2484217-d55873b9f369b09a.png
image

then:

2484217-94e349a8c7d3a944.png
image
mysqld install 

There is a problem, there may appear, service has exist, it is the service already exists.

You can first delete the service, and then install the service, as follows

sc delete mysql
mysqld install 

The message is to be the administrator mode can be successful.

Here is start the service:

First, the need to increase the final my.ini in the root directory of the file mysql sentence: skip-grant-tables, otherwise fail (you can also add the outset)

net start mysql

2484217-9778721e20ac66b5.png
image

change the password:

set password for root@localhost = password('123456'); 

mysql -u root -p
2484217-fa911843f6568464.png
image
2484217-39c950987dbacf74.png
image

Author: Eric Li
Source: http://www.cnblogs.com/ericli-ericli/
except reprinted articles, essays and blog garden belongs to the author of all, welcome to reprint, please indicate the source.
If you feel this post you gain something, think of pretty carefully, please click on the bottom right of the [recommended], thank you!

Reproduced in: https: //www.jianshu.com/p/8e9c924d7cef

Guess you like

Origin blog.csdn.net/weixin_33670786/article/details/91058546