select user,host,password from mysql.user;
select user,host,authentication_string from mysql.user;
update mysql.user set password=password('新密码') where user='root' and host='主机名或ip地址';
update mysql.user set authentication_string=password('新密码') where user='root' and host='主机名或ip地址';
flush privileges;