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:
If you want a specific user to access the MySQL server from all computers in a given domain (for example, mydomain.com, you can run the grant statement with the wildcard "%" in the host part of the account name.
Mysql> Grant...
-> On *.*
-> To 'myname' @ '% .mydomain.com'
-> Identified by 'mypass ';
To do the same thing by modifying the grant tables directly, do this:
You can also directly modify the authorization table:
Mysql> insert into user (host, user, password ,...)
-> Values ('% .mydomain.com', 'myname', password ('mypass '),...);
Mysql> flush privileges;
Solve the problem again:
1. allow user WP to log on to the MySQL server from 192.168.2.98 (the following instances are logon servers 192.168.2.28)
(1) authorize in MySQL: grant select, update, insert, delete on MySQL. * To 'wp '@ '192. 168.2.98' identified by '2016 ';
(2) connect with VFP: sqlstringconnect ("driver = {MySQL ODBC 3.51 driver}; server = 192.168.2.28; uid = WP; Pwd = 123; Port = 3306 ;")
If you have multiple URLs, You can authorize them separately.
2. Allow WP to log on to the MySQL server from a certain network segment
(1) authorize in MySQL: grant select, update, insert, delete on MySQL. * To 'wp '@ '192. 192. %' identified by '2016 ';
(2) connect with VFP: sqlstringconnect ("driver = {MySQL ODBC 3.51 driver}; server = 192.168.2.28; uid = WP; Pwd = 123; Port = 3306 ;")
3. allow user WP to log on to the MySQL server from any website
(1) authorization in MySQL: grant select, update, insert, delete on MySQL. * To 'wp '@' % 'identified by '20140901 ';
(2) connect with VFP: sqlstringconnect ("driver = {MySQL ODBC 3.51 driver}; server = 192.168.2.28; uid = WP; Pwd = 123; Port = 3306 ;")