After the remote connection to SQL Server 2005 was completed last time, it is now MySQL's turn... think back to the connection string connecting to the MySQL database:
Server =Localhost; Database = gyl; uid = root; Pwd = 111111;
The value of the server is localhost... it supports local... you just need to change localhost to an IP address. It is easy to think about it, but it is an error...
Error description:Host '60 -248-32-13.hinet-ip.hinet.net 'is not allowed to connect to this MySQL Server
In fact, MySQL does not support remote access by default. It is the default MySQL user root does not support remote access by default, because it is localhost...
To put it bluntly, that is, permission issues. The root user's host is localhost by default...
The following solution is to re-create a user and support remote access without modifying the root permission. We recommend that you do this by calling...
1. First, log on with the root user
2. Enter the following statement to create a new user and grant the corresponding permissions.
Grant select, insert, update, delete on [db_name]. * to [username] @ [ip_address] identified by '[Password]';
Note:
[Db_name]: indicates the name of the database to be opened to new users.
[Username]: New User Name
[Password]: the password of a new user,Enclose the letter with quotation marks (')
[Ip_address]: The DNS name after IP address or IP address Lookup
Important Notes: (My experience ,(~ O ~)~ Zz)
(1). If you want to grant all operation Permissions
GrantAllOn... to user name ......
(2) If you want to grant permissions to all tables in all databases
Grant... on*.*To username ......
(3) If you want to grant all tables of a Database
Grant... onDatabase Name .'*'To username ......([*] Single quotation marks must be added on both sides)
(4) If you want to assign a table to a database
Grant... onDatabase Name. Table NameTo username ......
(5). If you want to allow remote access from any client using the user name
Grant... on...Username @ %.......(Change the IP address to [%])
(6) You must restart the MySQL service after the modification.
Other Instructions:
Do you want to see which table these users are in?
Use MySQL;
Select host, user, password from user;
The Host field indicates the host to log on...
Okay... after writing... going to bed... mom and dad good night... Hee \ (^ o ^ )/~