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 ;")