Database Reference
In-Depth Information
Although we gave lena_stankoska@localhost enough privileges to manipulate data on our
two databases, we didn't give it the ability to delete data. To add privileges to a user ac-
count, you don't have to list again all of the privileges it already has. Just executethe
GRANT statement with the new privileges and the system will add them to the user ac-
count's privileges list. Do that like so:
GRANT DELETE ON rookery.*
TO 'lena_stankoska'@'localhost';
GRANT DELETE ON birdwatchers.*
TO 'lena_stankoska'@'localhost';
SHOW GRANTS FOR 'lena_stankoska'@localhost \G
*************************** 1. row ***************************
Grants for lena_stankoska@localhost:
GRANT USAGE ON *.*
TO 'lena_stankoska'@'localhost'
*************************** 2. row ***************************
Grants for lena_stankoska@localhost:
GRANT SELECT, INSERT, UPDATE, DELETE ON `birdwatchers`.*
TO 'lena_stankoska'@'localhost'
*************************** 3. row ***************************
Grants for lena_stankoska@localhost:
GRANT SELECT, INSERT, UPDATE, DELETE ON `rookery`.*
TO 'lena_stankoska'@'localhost'
Now Lena can manipulate data in all of the basic ways on our two databases, but only
from the localhost. She still can't do anything from home. We'll give herprivileges from
home later.
Search WWH ::




Custom Search