Tomcat web server - Chapter 12 . Security 331 Figure 12-19: An

Chapter 12 . Security 331 Figure 12-19: An example REVOKE statement, followed by an example DELETE statement. The FLUSH PRIVILEGES statement causes the delete to take effect immediately, preventing the (now-former) user from making a new connection. Revoking all privileges from a user won t necessarily truly remove all of their privileges. Specific privileges need to be specifically revoked. The SHOWGRANTS FOR statement can be quite useful in this situation to determine what specific privileges a user has for example, SHOW GRANTS FORWebuser@localhost. Changing passwords and other parameters Sooner or later, you will have to change a user s password as you administer a database server. You may also have to change a username or alter the host parameters for a database user. MySQL provides a function specifically for changing passwords; for other changes, normal SQL statements are required. There are two methods for changing a password in MySQL. The first is with the SET PASSWORD statement; the second is the UPDATEstatement. Both statements make use of the PASSWORD()function to encrypt the password. Examples of both methods for changing a password are in Figure 12-20. Use the UPDATE statement to change other parameters such as usernames and hosts. The syntax for the UPDATE statement is the same in this context as it is in other DML statements. In Figure 12-21, I issue various UPDATE statements to change usernames and hosts. Following the UPDATE, I issue the FLUSHPRIVILEGES statement to make the changes take effect immediately.
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Leave a Reply