MySQL database account authorization management Analysis (1) (2 ). 1.1 who can connect and connect from there? You can allow a user to connect from a specific host or a series of hosts. There is an extreme. if you know that demotion is connected from a host, you can assign permissions
1.1 who can connect and connect from there?
You can allow a user to connect from a specific host or a series of hosts. There is one extreme: If you know that a demotion is connected from a host, you can limit the permissions to a single host:
Grant all on samp_db. * TO boris @ localhost identified by "ruby" grant all on samp_db. * TO fred@res.mars.com identified by "quartz"
(Samp_db. * indicates "all tables in the samp_db database.) another extreme is that you may have a user max that is frequently traveling and needs to be connected from hosts around the world. In this case, you can allow him to connect from anywhere:
Grant all on samp_db. * TO max @ % identified by "diamond"
The "%" character acts as a wildcard and matches the LIKE pattern. In the preceding statement, it means "any host ". So max and max @ % are equivalent. This is the easiest way to build a user, but it is also the least secure.
You can allow a user to access from a restricted host set. For example, to allow mary to be connected from any host in the snake.net domain, use the following identifier:
Grant all on samp_db. * TO mary @ .snke.net identified by "quartz ";
If you like, the host part of the user identifier can be specified by an IP address instead of a host name. You can specify an IP address or an address that contains a pattern character. In addition, from MySQL 3.23, you can also specify an IP number with a network mask indicating the number of digits used for the network number:
(T115)
Http://www.bkjia.com/PHPjc/630982.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/630982.htmlTechArticle1.1 who can connect from there? You can allow a user to connect from a specific host or a series of hosts. There is an extreme. if you know that demotion is connected from a host, you can set the right...