If you are using the IP address, you can also specify a mask to specify how many bits must be used to match the address, it should be noted that the number of bits have to be a multiple of 8 (8, 16, 24, 32). For example .198.66.0/255.255.255.0 the value '151 'means that the line is valid for the IP 151.42.168.0 to 151.42.168.255. In the column 'User' are evidently contained the names of users that can be connected. Here it is not allowed to use the wildcard, but is allowed to leave the value blank, in which case all users who connect from the host name (or IP address) will be considered relevant, use any name. In this case, however, will be considered by MySQL as 'anonymous', which means that the username with which you have submitted will not be valid when the checks will be made to the permissions for various operations. It is clear that with this system it may happen that a user, when trying to connect, can be recognized based on the contents of multiple rows of the table user: in fact we see an example:
Code:
+-----------+----------+-
| Host | User |
+-----------+----------+-
|% | Sunikrew|
|% | Noctury|
| Localhost | Sunikrew|
| Localhost | |
+-----------+----------+-
In this situation, if the user connects from localhost Sunikrew, the first and the third row are able to recognize it, because the value of '%' is true for any host. Similarly, if there is Noctury (again from localhost), will be recognized in the second row but the fourth also, as the blank user name matches any user.
Bookmarks