After installing MySQL on windows, the system has generated a license table and an account by default, you do not need to execute the mysql_install_db script on the Unix platform to generate an account and the corresponding permission table. However, if you do not use the MSI format to install MySQL, you need to manually add a new password to the root account after installation, because the root account does not enable password protection by default, if you do not re-authorize the root account password, many non-local connections will fail. Follow these steps to update the password:
C:> mysql-u root
Mysql> set password for 'root' @ 'localhost' = password ('newpasswd ');
Mysql> set password for 'root' @ '%' = password ('newpasswd'); // The preceding settings are optional, the root password is changed to newpasswd, and the root user's root password is set.