Chapter 12 . Security 329 Figure 12-18: Some (Cpanel web hosting)

Chapter 12 . Security 329 Figure 12-18: Some variations of the GRANT statement as useful syntax examples The value for can contain any valid hostname, IP address, or localhost. In addition, the wildcards % and _are valid as are netmask values. For all hosts, the % wildcard can be used. When using a wildcard or netmask value, the portion must be quoted. For example, username 192.168.1.% would grant access to username from any address within the 192.168.1.0/24 range. This is the same as username 192.168.1.0/255.255.255.0 . If given username % then username at any host would be allowed. You can require the user connect only via a secure connection such as Secure Sockets Layer (SSL) or with X509. This functionality is achieved by adding the REQUIRE modifier to the GRANTstatement. If you wish for the user to have the ability to add, delete, and alter privileges within the database you must add the WITH GRANT OPTIONmodifier to the end of the GRANT statement. This is true even if you use the ALL PRIVILEGESmacro to enable all privileges for the user. The GRANTprivilege is not included with the ALL PRIVILEGES macro. Caution Use care when issuing GRANT statements so as not to give too many privileges or give them to unintended users. As with all database administration, you should be careful when issuing GRANT statements. Since MySQL uses a user/host combination for authentication, there can be multiple users in the database with the same username. Ensuring that you are granting access to the correct user or users is very important.
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

Leave a Reply