If you want to give a specific user access from all machines in a given domain (for example, mydomain.com), you can issue a GRANT statement that uses the ‘%' wildcard character in the host part of the account name:
译文:如果需要让特定的用户从给定域(例如mydomain.com)的所有计算机上访问 MySQL 服务器,你可以执行在账户名的 host 部分使用了通配符“%” 的 GRANT 语句
mysql> GRANT ...
-> ON *.*
-> TO 'myname'@'%.mydomain.com'
-> IDENTIFIED BY 'mypass';
To do the same thing by modifying the grant tables directly, do this:
译文:也可以使用直接修改授权表的方式来实现:
mysql> INSERT INTO user (Host,User,Password,...)
-> VALUES('%.mydomain.com','myname',PASSWORD('mypass'),...);
mysql> FLUSH PRIVILEGES;
再来解决问题:
一、允许用户 wp 从 192.168.2.98 登录 MySQL 服务器(下面的实例均为登录服务器192.168.2.28)
(1)先在MySQL中授权:grant select,update,insert,de