select host,user,plugin from mysql.user;
update mysql.user set host='%' where user='root' and host='localhost';
flush privileges;
update mysql.user set authentication_string=PASSWORD(''), plugin='mysql_native_password' where user='root';
flush privileges;