After the installation is complete, unable to log on to MySQL, it is said that the new installation by default is the root user login, and the password is empty, so you can directly into the, but there are the following problems
F:\mysql-5.7.10-win32\mysql-5.7.10-win32\bin>mysql-u Root
ERROR 1045 (28000): Access denied for user ' root ' @ ' localhost ' (using Password:no)
After I surf the internet to find the new MySQL default password, after I try to add a skip-grant-tables in the configuration file, reboot can go in, so it must be the password problem
So I began to search for a variety of solutions, after some effort, finally found a solution
Mysql>delete from Mysql.user where user= ' root ' and host= ' localhost ';
Query OK, 1 row affected (0.01 sec)
Mysql> select User,host from Mysql.user;
+-----------+----------+
|user |host |
+-----------+----------+
|mysql.sys |localhost |
+-----------+----------+
1 row in Set (0.00 sec)
Mysql>flush privileges;
Query ok,0 Rows Affected (0.00 sec)
Mysql>grant all on * * to ' root ' @ ' localhost ' identified by ' dingwei351 ';
Query ok,0 rows affected, 1 Warning (0.00 sec)
Mysql>select user,host from Mysql.user;
+----------+-----------+
|user |host |
+----------+-----------+
|mysql.sys |localhost |
|root |localhost |
+----------+-----------+
2 rows in Set (0.01 sec)
But it's not going to work, you'll find a situation with the following command
Mysql>select * from Mysql.user;
Grant shows that the N--mysql permission architecture system (which should be said) is off, so you should do the following
Mysql>grant all on * * to ' root ' @ ' localhost ' identified by ' dingwei351 ' with GRANT option;
Query ok,0 rows Affected (0.01 sec)
Quit MySQL, skip-grant-tables, and then restart MySQL. It's time to log in again.
F:\mysql-5.7.10-win32\mysql-5.7.10-win32\bin>mysql-u root-p
Enter password:**********
Welcome to the MySQL Monitor. Commands End With; or \g.
Your MySQL Connection ID is 2
Server version:5.7.10 MySQL Community server<gpl>
Copyright<c>2000,2015,oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of the Oracle Corporation and/or its
Affiliates. Other names trademarks of their respective
Owners.
Type ' help ' or ' \h ' for help. Type ' \c ' to clear the current input statement.
Windows MySQL 5.7.10 can not log on the issue