1, unzip the Mysql-5.7.19-winx64.zip compressed file to the C:\MySQL\ directory;
2, in the C:\MySQL\ directory to create a new my.ini configuration file;
3. Open the My.ini file with a text editor or other editor, copy and paste the following code, and save the exit;
#代码开始[Client]#设置3306端口port= 3306[mysqld]#设置3306端口port= 3306# Set up the MySQL installation directory Basedir=c:\mysql# Set the data storage directory for the MySQL database DataDir=c:\mysql\data# Maximum number of connections allowed Max_connections= $# The character set used by the service side defaults to the 8-bit encoded latin1 character Setcharacter-Set-Server=utf8# default storage engine to use when creating a new tabledefault-Storage-Engine=Innodbsql_mode=No_engine_substitution,strict_trans_tables[MySQL]# Set the MySQL client default character setdefault-character-Set=utf8# end of code
4, configuration environment variables;
4.1, the new system variable Mysql_home, and the configuration variable value is C:\mysql;
4.2. Edit the system variable path, and add the%mysql_home%\bin to the path variable value.
5. Run command prompt cmd as administrator (be sure to run as administrator, or not have enough permissions);
5.1, use DOS instruction, enter the C:\mysql directory, run the following command
-- Defaults-file=my.ini--initialize-insecure -- installnet start MySQL
5.2. Set the root password of MySQL and run the following command
- - P Use MySQL; Update User set authentication_string=password (' your password 'where User='root'privileges; Exit
mysql5.7.19 winx64 Release Installation configuration tutorial