## End of Exercises

### In this lab, you have learned

- User Management
  - Created user jack with a password and later modified it.
  - Verified user creation by querying mysql.user.
  - Removed users and roles when no longer needed.
- Role-Based Access Control (RBAC)
  - Created roles (r_manager, r_staff, r_mgr, r_emp) to group permissions.
  - Assigned privileges (e.g., SELECT, INSERT, UPDATE, DELETE) to roles.
  - Granted roles to users for streamlined permission management.
- Permission Enforcement
  - Tested access control by logging in as jack and querying tables (emp, dept).
  - Learned that roles must be activated (SET ROLE ALL) before privileges apply.
  - Observed how direct grants (e.g., SELECT on dept) differ from role-based grants.
- Security Best Practices
  - Applied the principle of least privilege—users only received necessary access.
  - Cleaned up unused roles and users to maintain a secure environment.
