Versions are as follows:
Windows10
Mysql5.7.18
: https://dev.mysql.com/downloads/mysql/
I extracted to: D:\Program Files (x86) \mysql57
After extracting, configure the system environment variables.
New system environment variable: mysql_home
Values are: D:\Program Files (x86) \mysql57
Then add in path:%mysql_home%\bin
Create a file under D:\Program files (x86) \mysql57\ My.ini
The contents are as follows:
[Client]port=3306default-character-set=utf8[mysqld]port=3306 Character_set_server=Utf8basedir=D:\Program Files (x86) \mysql57datadir=D:\Program Files (x86) \mysql57\datalower_case_table_names=2[Winmysqladmin]d:\program Files (x86) \mysql57\ Bin\mysqld.exe
Press Win+x to run the Administrator command prompt
Installation Services: mysqld install MYSQL--defaults-file= "D:\Program Files (x86) \mysql57\my.ini"
Initialize: mysqld--initialize-insecure--user=mysql
Start service: net start MySQL
Set root password: mysqladmin-u root-p password Enter a new password here
Required to enter the password, the direct return, the settings will be a warning after the completion, ignore it, it has been installed
Startup command: net start MySQL
Stop command: net stop MySQL
Uninstall command: Mysqld-remove
Install Mysql5.7 under Windows