How to access this computer's Mysql settings from other computers _mysql

Source: Internet
Author: User
Tags odbc
If you are want to give a specific user access from all machines into a given domain (for example, mydomain.com), you can issue A GRANT statement that uses's '% ' wildcard character in the host part of the account name:
If you need to have a specific user access to a MySQL server from all computers on a given domain (such as mydomain.com), you can perform a GRANT statement that uses the wildcard "%" in the host part of the account name
Mysql> GRANT ...
-> on *.*
-> to ' myname ' @ '%.mydomain.com '
-> identified by ' Mypass ';

To did the same thing by modifying the grant tables directly, does this:
: You can also use the direct modification of the authorization table to:
Mysql> INSERT into User (Host,user,password,...)
-> VALUES ('%.mydomain.com ', ' myname ', PASSWORD (' Mypass '),...);
mysql> FLUSH privileges;



To solve the problem again:

First, allow users WP from the 192.168.2.98 login MySQL server (The following instances are login server 192.168.2.28)
(1) Authorize in MySQL first: Grant Select,update,insert,delete on mysql.* to ' WP ' @ ' 192.168.2.98 ' identified by ' 123 ';
(2) Re-use VFP connection: Sqlstringconnect ("Driver={mysql ODBC 3.51 driver};server=192.168.2.28;uid=wp;pwd=123;port=3306;")

If you have more than one URL, execute the authorization separately.

Second, allow users WP from a network segment login MySQL server
(1) Authorize in MySQL first: Grant Select,update,insert,delete on mysql.* to ' WP ' @ ' 192.168.2.% ' identified by ' 123 ';
(2) Re-use VFP connection: Sqlstringconnect ("Driver={mysql ODBC 3.51 driver};server=192.168.2.28;uid=wp;pwd=123;port=3306;")

Third, allow users WP from any URL login MySQL server
(1) First in MySQL authorization: Grant Select,update,insert,delete on mysql.* to ' WP ' @ '% ' identified by ' 123 ';
(2) Re-use VFP connection: Sqlstringconnect ("Driver={mysql ODBC 3.51 driver};server=192.168.2.28;uid=wp;pwd=123;port=3306;")
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.