334 Part III . (Web hosting ratings) Administration Figure 12-22: Various
334 Part III . Administration Figure 12-22: Various Access Denied errors . In the first example, I simply forget to specify the -p switch to have MySQL prompt me for a password. . In the second example, I remember the -pswitch but only press Enter at the prompt. . The third example is familiar to me (and to too many of us): a mistyped password. . The final example is denied simply because the user does not have any privilege that allows connection to the mysql database. The third example in Figure 12-22 is interesting because that same error can occur if the user exists but the password is different for that user/host combination. For example, if a database has two users called suehring, one user/host combination could be suehring@localhost and another could be suehring@192.168.1.1. If the passwords are different for each user/host combination and I typed the wrong password for either one, the same error would occur. Note MySQL uses the user/host combination for authentication against a password. Oops, I forgot the root password Though you someday may be in a situation that requires you to perform these steps on your MySQL server, I sincerely hope you never have to. If you have forgotten the root password for MySQL and don t have any other users with GRANT privileges on the database server, you will need to reset the password in order to be able to perform GRANTS and possibly other functions. Here are the steps, and may you never need them: 1. Stop the database.
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.