(1)登录mysql,在mysql程序中切换到mysql系统数据库:
use mysql;
(2)授权:
grant all privileges on *.* to 'root' @'%' identified by '1234';
赋予任何主机访问数据的权限,且设置远程连接的密码为:1234
(3)刷新权限 :
flush privileges;
修改连接密码:
update user set password=password('123456') where user=’root’;