MySQL ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using password:no) solution and Reason
These two days to download the installation of MySQL5.7.11, found that the first time to use the input password, anyway, even in accordance with the online said under the mysqld add Skip-grant-tables is not, and later studied for two days, and finally find out the reasons and solutions.
Copy Code code as follows:
[MYSQLLD]
Skip-grant-tables;
Reason: Mysql 5.6 and later version out of security considerations, the root password is not empty. So in the MySQL installation process, will generate a random password as the initial password.
The password here cannot be empty, and you want to enter a randomly set password.
Password in:
D:\Program Files\mysql-5.7.11-winx64\data.
are:
This is a random password, using the root account and this random password can be logged in.