Users and privileges
Inspect and revoke privileges
Verify the full account and privilege scope, then remove access with MySQL's REVOKE FROM syntax and test the result.
8 minute lesson
~~~
Inspect an account with:
SHOW GRANTS FOR 'notes_app'@'localhost';
Remove a privilege with REVOKE ... FROM and the same scope used by GRANT:
REVOKE DELETE
ON notes_app.*
FROM 'notes_app'@'localhost';
Run SHOW GRANTS again, then verify that reads still work and deletes fail. Grant DELETE back only if the running application genuinely needs it.
Lesson completed