Installation method of MySQL version 5.7.21: First download the mysql installation package and decompress it; then install and configure the environment variables, and after configuring, create a new file to hold the "my.ini" file; finally use the cmd command Just install, initialize and start the database.
Installation method of MySQL5.7.21 version: Download the mysql installation package and unzip it, then install and configure the environment variables. After configuration, create a new file to store my. ini file, and then install, initialize and start the database under the cmd command
[Recommended course: MySQL Tutorial]
The installation method of MySQL5.7.21 version is as follows
(1) To download the decompressed version of MySQL, download address: https://www.mysql.com/downloads/
(2) Unzip the installation package and customize the installation path. In this example, C:\software\ , so the full path of MySQL is: C:\software\mysql-5.7.21-winx64
(3) Configure environment variables and add system environment variables:
Key name: MYSQL_HOME
The value is: C:\software\mysql-5.7.21-winx64
##Add in Path: %MYSQL_HOME %\bin, please note that the ";" symbol between different values in Path cannot be omitted (5) Prepare the my.ini file. You can create a new my.txt file first, and then modify the file suffix by renaming it. It is .ini. The my-default.ini file may exist after decompression in previous versions, but it does not exist in the 5.7.21 version, so you need to manually create the file yourself. The content of the file is as follows:[mysqld] port = 3306 basedir=C:/software/mysql-5.7.21-winx64 datadir=C:/software/mysql-5.7.21-winx64/data max_connections=200 character-set-server=utf8 default-storage-engine=INNODB sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES [mysql] default-character-set=utf8
mysqld -install
mysqld --initialize-insecure --user=mysql
net start mysql
The above is the detailed content of How to install mysql version 5.7.21. For more information, please follow other related articles on the PHP Chinese website!