1. Create a new file named My.ini. My.ini in the Bin folder of the MySQL extract directory, with the contents of
[Client]port=3306default-character-set=utf8[mysqld]port=3306character_set_server=utf8basedir=%mysql_home% Datadir=%mysql_home%\data[winmysqladmin]%mysql_home%\bin\mysqld.exe
2. Configure Environment variables
Create a new system variable named Mysql_home, the value of the variable is MYSQL extracted directory
Then find the system variable is the Path of the item, select and click the Edit button, at the end of the variable value added to the MySQL folder bin directory
In this step, the setup of the MySQL environment variable is completed.
3. Next initialize the MySQL database, generate the Data folder
Win + R, open cmd, input mysqld--initialize-insecure--user=mysql, enter after the data folder is visible in the MySQL extract directory
This completes the creation of My.ini and data.
4. Finally, to install the MySQL service, it is important to note that if you do not enter the%mysql_home%\bin directory installation, the start of the MySQL service will be reported "system cannot find the specified file" error, please follow the following steps to install.
Win + R re-open a cmd and switch to the Bin folder under the MySQL directory
Enter Mysqld–-install in cmd to install MySQL to the Windows service
If you are prompted for service successfully installed, the installation succeeds
Then enter the net start MySQL in cmd and start the MySQL database service
The installation of this MySQL decompression version is complete.
PS: Initialize root password
Use the mysqladmin-u root-p Password command, prompt for a password to enter directly, and then enter a new password to complete the password modification
The command to exit MySQL is exit. The direct close CMD window is not exited, and the exit is not exited until you enter exit.
Installation tutorial for MySQL Compact Edition