win7 install MySQL 5.7.

According to the online tutorial, it took half an hour to extract the installed version of MySQL. The installation process step on a few pit, Ado, on the process.

step1: Download
download URL: https: //dev.mysql.com/downloads/mysql/

I installed date is March 2, 2018, version 5.7.21, my computer is win7 64 bit systems according to their own respective version, click Download, as shown:

Then jump to the following screen. Note that no registration is not required to log, click on the red part:

The best choice for download and non-system disk extracting installer. I put the D disk, after extracting file folder location: D: \ mysql-5.7.21-winx64

step2: installation
this step, we are divided into the following several steps:

 1. Run as administrator DOS window (Start Menu - Enter the "Run" - enter "cmd" - OK), and then go to the next mysql bin folder, enter a manner as shown, in turn enter d: Enter, cd mysql-5.7.21-winx64 enter, cd bin carriage return (I directly installed in d drive, so direct input d: enter, if installed in a different folder, the folder path to write and then enter):


2. The focus here: dos window in which enter: mysqld --initialize-insecure 
note, write some tutorials to create an empty file called himself the next data folder, and then create a my.ini file, this is wrong, because it-yourself construction data folder does not start mysql table structure configuration files needed, therefore first initialization, enter the above command, you initialize the mysql look at the folder will find more of a file called data folder * Note data folder is created by the system, not their own manually created *, take a few seconds to run, dos windows do not return results:

3. my.ini configuration file
to create a text file called my.ini in the previous step to generate the data folder contents as follows:

```

[mysql]
# mysql client to set the default character set
default-Character-the SET utf8 = 
[mysqld]
# set port 3306
Port = 3306 
# Set the mysql installation directory
basedir = D: \ mysql-5.7.21-Winx64
# Set mysql database data storage directory
DATADIR = D: \ MySQL-5.7.21-Winx64 \ data
# maximum number of connections
max_connections = 200 is
# character set used by the server defaults to the 8-bit coded character set latin1
character-set-server = utf8
# will be used when you create a new default storage engine table
default-storage-engine = INNODB

```

Note basedir and datadir to set your own installation directory path, the path delimiter what is / or \\ or \, in order to avoid mistakes, it is best to copy the path rather than manually input.

 4.dos window, enter: mysqld -install (if already exists, you can use the sc delete mysql or mysql -remove to delete it)
will be displayed Service successfully installed:


5.dos window and enter: net start mysql # start mysql service

 


Original: https: //blog.csdn.net/gejia0609/article/details/79426653 
 

发布了69 篇原创文章 · 获赞 13 · 访问量 11万+

Guess you like

Origin blog.csdn.net/mutiantong/article/details/96469451