一是对你的IP 172.16.1.10 进行授权
grant privileges on dbname.* to "user "@ "172.16.1.10 " identified by "password ";
如果只是你自己用的话就可以这样写
grant all on *.* to "user "@ "172.16.1.10" identified by "password ";
grant具体的用法你就参考一下mysql的用户手册吧,如果这样不行的话,就只能通过以下方法进行授权了
mysql> use mysql;database changed
mysql> desc user; 查看有多少个字段mysql> insert into user values(val1,val2,....);
二是就将root用户设为可以远程登录,也即是可以从任何机器上登录
mysql> use mysql;
database changed
mysql> update user set host= "%" where user= "root";
mysql>use mysql
grant all on *.* to "root"@"172.30.41.72" identified by "xcfg304";
restart mysql server
方法三:直接在mysql的数据库管理后台执行:
use mysql;
grant all on *.* to "root"@"172.30.41.95" identified by "xcfg304";
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com