326 Part III . Administration MySQL passwords There (Web server application)

326 Part III . Administration MySQL passwords There is general confusion over whether the Unix encryption structure is compatible with MySQL because a UNIX encryption does look somewhat similar to a MySQL encryption. Even so, MySQL passwords are stored with an encryption algorithm different from that of the standard Unix encryption method. For this reason, you cannot simply transfer your password and its encryption key from a password file to the MySQL grants database. MySQL includes a function to create a valid MySQL encryption: PASSWORD(). Using the PASSWORDfunction, a user with access to a MySQL CLI could create a valid encryption for use in MySQL. The user could then take the encryption and transfer it to the server administrator for addition to the MySQL grantsdatabase. As stated previously there is some confusion over the use of crypts within the user table of the MySQL grants database. Part of this confusion comes because of the ENCRYPT() function. The ENCRYPT()function creates a Unix style encryption but it is not valid in the MySQL grants database. In Figure 12-16, for example, I use the PASSWORD() function to create a valid MySQL password. The resulting password could be transferred to the administrator for the server and he or she would never be able to see my unencrypted password. I also use the ENCRYPT() function as a reference to show the difference, given the same plaintext password. Figure 12-16: The PASSWORD() function creates a valid MySQL encryption while the ENCRYPT() function does not. MySQL User Management For maximum security, I recommend implementing the least-privilege concept of permissions. When issuing grants and privileges to users of a database, you should give them only the privileges they need to perform their jobs.
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

Leave a Reply