1, download the compressed package, and decompression to the target location 2, new My.ini file under Bin (only version without default profile) content is #代码开始 [client] # Set 3306 ports port=3306 [mysqld] #设置3306端口 port=3306 # setting up the MySQL installation directory basedir=c:\program files\mysql\mysql-5.7.19-winx64 # Setting the data storage directory for the MySQL database datadir=c:\program Files\ mysql\mysql-5.7.19-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 # default storage engine to use when creating a new table default-storage-engine=INNODB sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [mysql] # Set MySQL client default character set default-character-set=utf8 #代码结束 3, new Data folder, empty folder to 4, configure environment variables: Add Bin directory under path, such as: C:\Program files\ Mysql\mysql-5.7.19-winx64\bin 5, cmd/Run as Administrator 6, use the cmd command to start installation Enter CD G:\Program Files\mysql\mysql Server 5.7\bin Enter the bin directory mysqld--initialize--user=mysql--console Make a note of the random password generated by the last line for example: 2017-07-28t10:0 2:03.149629z 1 [Note] A temporary password is generated for [email protected]:%i:vmba=s8u5 password:%i:vmba=s8u5 then enter mysqld--install Success will show servers successfully installed console under input net start MySQL start MySQL service 7, use the mysql-uroot-p command to log in to the database, Password is randomly generated password Note: The password must be changed immediately after login, otherwise the command change password cannot be executed: SET PASSWORD = PASSWORD (' new_password ');
Installation of a MySQL compressed package (. zip) using