1、以root用户登录 mysql后,执行如下命令:
2、输入use mysql;
3、输入grant all privileges on *.* to root@‘%’ identified by ‘密码’;
4、输入flush privileges;