1、修改本机密码
set password for root@localhost = password(‘123456’);
2、修改远程登录密码
set password for root@’%’ = password(‘123456’);
3、让root可作为远程登录账户
GRANT ALL PRIVILEGES ON *.* TO ‘root’@’%’ IDENTIFIED BY ‘root’ WITH GRANT OPTION;
转自https://blog.csdn.net/u011311291/article/details/87923540