A, unpack the archive in the directory of the working example: D: \ workSoft \ mysql-5.7.24-winx64
Creating data in the directory (the bin folder at the same level) folder,
Creating (bin folder with the same level) in the directory created my.ini configuration file as follows
Copy the following contents into the red body word my.ini file Note: "#" proposed to delete this line
[mysql]
# Mysql client to set the default character set
default-character-set=utf8
[mysqld]
wait_timeout=10
Set # 3306 Port
port = 3306
# Set the mysql installation directory
basedir=D:\mysql-5.7.24-winx64
# Set the data storage directory of mysql database
datadir=D:\mysql-5.7.24-winx64\data
# Maximum number of connections allowed
max_connections=200
# Server default character set used for the 8-bit coded character set latin1
character-set-server=utf8
The default storage engine that will be used when creating a new table #
default-storage-engine=INNODB
Second, type cmd, and run as administrator console, enter the MySQL path (D: \ softwares \ mysql-5.7.14-winx64 \ bin), run mysqld install command. Note: It should be run as administrator
mysqld --install MySQL2 --defaults-file = "installation directory \ my.ini" // install mysql service
mysqld --initialize // must initialize
net start MySQL2
Third, the installation is automatically given a random password, you need to manually search in the mysql directory * .err
Open as text to see something like the following:
016-02-25T15:09:43.033062Z 1 [Note] A temporary password is generated for root@localhost: >mso<k70mrWe
The above is the first time login password.
After seeing the password, go directly to navicat create a database with the password above. Once created, navicat will be prompted to modify the account password. Can be completed
mysql uninstall process
1, shut down service
Run as administrator cmd, execute the following command:
NET STOP MySQL
2, uninstall
mysqld -remove [service name]
Set wait timeout
Open the my.ini file, add wait_timeout = 1814400 (21 days)
In the service page, restart mysq L
mysql client (ie navicat) execution the following sql, view the configuration take effect if
show global variables like 'wait_timeout';
So far, wait_timeout configuration modification is completed.