Worked for me and “5.7.11 MySQL Community Server”:
use mysql;
update user set authentication_string=password(''), plugin='mysql_native_password' where user="root";
I had to change the ‘plugin’ field as well because it was set to ‘auth_socket’.
After that I could connect as mysql -u root
without a password.