Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
modul:m290:learningunits:lu06:loesungen:l02 [2024/09/27 14:54] – gelöscht vdemir | modul:m290:learningunits:lu06:loesungen:l02 [2024/11/13 16:43] (aktuell) – cbolzern | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
+ | ====== LU09.S02 - SQL- DCL: CREATE USER ====== | ||
+ | ===== Task 2.1 ===== | ||
+ | **Create the User**: Create a user named // | ||
+ | |||
+ | CREATE USER ' | ||
+ | |||
+ | ===== Task 2.2 ===== | ||
+ | ** Overview of the current privileges**: | ||
+ | |||
+ | SELECT user, host, plugin FROM mysql.user; | ||
+ | |||
+ | The result set should look like: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ===== Task 2.3 ===== | ||
+ | **Grant Privileges Without Table Management**: | ||
+ | |||
+ | GRANT SELECT, INSERT, UPDATE, DELETE ON myDatabase.* TO ' | ||
+ | |||
+ | ===== Task 2.4 ===== | ||
+ | **Revoke Privileges**: | ||
+ | |||
+ | REVOKE CREATE, ALTER, DROP ON myDatabase.* FROM ' | ||
+ | |||
+ | ===== Tasc 2.5 ===== | ||
+ | **View the User’s Privileges**: | ||
+ | |||
+ | SHOW GRANTS FOR ' | ||
+ | | ||
+ | {{: | ||
+ | |||
+ | ===== Task 2.6 ===== | ||
+ | **Test the User’s Access**: Establish a new console connection to the database by using // | ||
+ | |||
+ | {{: | ||
+ | |||
+ | ===== Task 2.7 ==== | ||
+ | |||
+ | Finally, try to perform a CREATE TABLE or DROP TABLE operation. The attempt should result in a permission error als displayed in the image below. | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | ===== Task 2.8 ===== | ||
+ | **Delete the User (optional)**: | ||
+ | |||
+ | {{: | ||
+ | |||
+ | |||
+ | |||
+ | ===== Vocabulary ===== | ||
+ | ^ English ^ German ^ | ||
+ | | .. | .. | | ||
+ | |||
+ | |||
+ | |||
+ | ---- | ||
+ | [[https:// |