User Tools

Site Tools


sidebar_sql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

sidebar_sql [2024/05/10 12:04] – created waltersidebar_sql [2024/05/17 11:23] (current) walter
Line 1: Line 1:
-====== Create and Permissions ======+====== Übersicht SQL ======
  
-**Syntax - Create User** 
  
-<code sql> +  - [[create_permission|SQL Create & Permission]]
-CREATE USER 'username'@'host' IDENTIFIED WITH authentication_plugin BY 'password';+
  
-Beispiel: 
-CREATE USER 'sammy'@'localhost' IDENTIFIED BY 'password'; 
-</code> 
  
- 
-**Syntax Grant** 
- 
-<code sql> 
-GRANT PRIVILEGE ON database.table TO 'username'@'host'; 
-FLUSH PRIVILEGES; 
- 
-Beispiel: 
-GRANT CREATE, ALTER, DROP, INSERT, UPDATE, DELETE, SELECT, REFERENCES, RELOAD on *.* TO 'sammy'@'localhost' WITH GRANT OPTION; 
- 
-SHOW GRANTS FOR 'username'@'host'; 
-</code> 
- 
-**Sonstiges** 
-<code sql> 
-REVOKE type_of_permission ON database_name.table_name FROM 'username'@'host'; 
-DROP USER 'username'@'localhost'; 
-</code> 
sidebar_sql.txt · Last modified: 2024/05/17 11:23 by walter