Dies ist eine alte Version des Dokuments!
LU09.A01 - SQL- DCL: CREATE User - Under construction
Requirements
- Work type: individual
- Timeframe: 15 Minutes
- Means of aid:
- only teaching materials, no websearch, no use of ai.
- Webstorm with connection to the MySQL-DB
- Expected result: Semantically and syntactically correct SQL statements according to the requirements of the case studies.
Case studies / Assignments
Task A
Create the User: Create a user named restrictedUser with the password SafePassword123 using the mysql_native_password plugin.
Task B
Grant Privileges Without Table Management: Grant the user restrictedUser the ability to read and write data but not to create, alter, or drop tables. Use the following commands to give only the required privileges.
Task C
Rovoke Privileges: To be certain that nothing unintended can happen revoke the CREATE, ALTER, and DROP privileges explicitly.
Tasc D
View the User’s Privileges: Check the privileges to ensure that the user cannot manage tables.
Task E
Test the User’s Access: Connect as restrictedUser and try to perform a CREATE TABLE or DROP TABLE operation. The attempt should result in a permission error.
Task F
Delete the User (optional): After testing, you can delete the user if they are no longer needed.