Today in the process of installing MySQL did not let me enter the password, log in and do not need a password to enter, which makes me very confused.
Enter the database to set the password, in a variety of ways are not.
Although I do not have anything in this database, but can not without the password on the naked run ah, a bit embarrassing is it.
Google a bit, found a solution.
See the root of the plugin is Auth_socket
mysql> use MySQL;
mysql> UPDATE user SET plugin= ' mysql_native_password ' WHERE user= ' root ';
mysql> FLUSH privileges;
Mysql> \q Enter
Then enter the Mysql-uroot-p, prompt for the password to enter directly, enter the database, set password= ' YourPassword ';
Complete
Original link: https://stackoverflow.com/questions/39281594/error-1698-28000-access-denied-for-user-rootlocalhost
MySQL ERROR 1698 (28000): Access denied for user ' root ' @ ' localhost '