First, download the ZIP archive file from the official website
Website: http://dev.mysql.com/downloads/mysql/
Second, decompression
Unzip the downloaded package to the place you want to install it
Iii. Configuring INI file
Open the extracted files, there is a My-default.ini file. We are now going to create a new My,ini file, and then the new file content includes at least but not limited to the following:
[MySQL]
# Set the MySQL client default character set
Default-character-set=utf8
[Mysqld]
#设置3306端口
Port = 3306
# set up the MySQL installation directory
Basedir=e:\program Files (x86) \mysql-5.7.12-winx64
# Set up a storage directory for MySQL database data
Datadir=e:\program Files (x86) \mysql-5.7.12-winx64\data
# Maximum number of connections allowed
max_connections=200
# The character set used by the service side defaults to the 8-bit encoded latin1 character set
Character-set-server=utf8
# The default storage engine that will be used when creating a new table
Default-storage-engine=innodb
* * Note that the latest version of MySQL inside is no data this folder, to create a new
Four, installation environment
Run command prompt (CMD) as Administrator, switch directory to bin file directory in your unzip file, do not switch to view,
Then enter mysqld install carriage return.
Then enter Mysqld--initialize-insecure--user=mysql return
Then enter the net start MySQL startup service
V. Start MySQL
Enter Mysql-uroot-p, the default is no password, direct enter enter.
Set Password input mysqladmin-uroot-p password password
Exit to enter exit, close CMD directly will not exit the database
VI. Setting Environment variables
It can be troublesome to open a CD to the installation directory every time after you successfully open MySQL, and after configuring the environment variable, you can use Mysql-uroot-p to enter the database directly.
To find the Environment variable edit page (various systems open in different ways, win10 directly in the lower left corner of the search environment variable is good), find the path, and then edit, unzip the files in the file of the bin file path to add it.
Now you can enter mysql-uroot-p to open MySQL after you open cmd directly.
MySQL Latest version 5.7.12 installation tutorial (Windows)