Install MySQL under Windows, and note whether your Windows is 32-bit or 64-bit.
MySQL official website: https://dev.mysql.com/downloads/mysql/
After downloading, unzip and put in the location you need, for example: D:\MySQL\mysql-8.0.11-winx64
Next, you can configure the environment variables
Variable name: mysql_home
Variable Value: D:\MySQL\mysql-8.0.11-winx64
Path added:%mysql_home%\bin
Use CMD, remember to use the administrator to start the CMD, otherwise it will not succeed, if you do not know how to start cmd with administrator rights, you can pass C:\Windows\System32 under the Cmd.exe
Switch to the directory where you installed MySQL \ bin below
Execute command: Mysqld-install
There's a problem with me here.
The problem occurs because the path it initializes is different from the path I am installing now, and some of the previously installed MySQL configurations are not removed cleanly.
At first I did not look closely, then executed the net start MySQL start MySQL service, error
FIX: Uninstall remove: Mysqld--remove
Then execute the command: Mysqld-install, this time there's no problem.
Finally start the service net start MySQL
Next Test MySQL can be normal use, login MySQL, because there is no password, so the password directly to the Mysql-u root-p, root is the default user.
Test the query user name and password: select host,user,authentication_string from Mysql.user;
MySQL installation is complete.
Installing MySQL and resolving problems that occur