直接在需要连接的数据库命令行下面执行命令,代表开放了一个所有ip都可以访问的用户 grant all privileges on *.* to root@"%" identified by 'admin' with grant option; //%代表所有ip //root账号 admin是密码 自行替换