Database Reference
In-Depth Information
+----------------+-----------+
| User | Host |
+----------------+-----------+
| lena_stankoska | % |
| lena_stankoska | localhost |
+----------------+-----------+
As you can see here, there are two user accounts, although we sought to create only one.
If you had not understood before the distinction between a user and a user account, I hope
you do now.
WARNING
Although you may be able to access the user account privileges directly in the mysql database, you
should never use that method to make changes touser account data. Although the examples so far have
been simple, there are situations in which user permissions will affect several tables in the mysql data-
base. If you attempt to insert, update, or delete a user account in the user tableusing the INSERT ,
UPDATE , or DELETE statements instead of the appropriate user account statements described in this
chapter, you may not make the changes the way you want and may orphan entries in other tables.
To eliminate both of the user accounts that we created for Lena, we will have to execute
the DROP USER statement twice, like this:
DROP USER 'lena_stankoska' @ 'localhost' ;
DROP USER 'lena_stankoska' @ '%' ;
This eliminates both user accounts for Lena. We'll create more user accounts for her in the
next sections. In doing so, though, we will look more closely at how to restrict access of
user accounts, rather than give her all privileges and access from anywhere and without a
password.
Search WWH ::




Custom Search