In This Chapter
Understanding MySQL data security
Adding new MySQL accounts
Modifying existing accounts
Your data is essential to your Web database application. You have spent valuable time developing your database, and it contains important information entered by you or by your users. You need to protect it. In this chapter, I show you how.
You need to control access to the information in your database. You need to decide who can see the data and who can change it. Imagine what would happen if your competitors could change the information in your online product catalog or copy your list of customers — you'd be out of business in no time flat. Clearly, you need to guard your data.
MySQL provides a security system for protecting your data. No one can access the data in your database without an account. Each MySQL account has the following attributes:
A hostname — the machine from which the account can access the MySQL server
A set of privileges
To access your data, someone must use a valid account name and know the password associated with that account. In addition, that person must be connecting from a computer that's permitted to connect to your database via that specific account.
After the user is granted access to the database, what he or she can do to the data depends on what privileges have been set for the account. Each account is either allowed ...