You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/vshn-managed/mariadb/usermanagement.adoc
+21-7Lines changed: 21 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ If a user needs access to another user's database, it can be specified by the `d
14
14
apiVersion: vshn.appcat.vshn.io/v1
15
15
kind: VSHNMariaDB
16
16
metadata:
17
-
name: pgsql-app1-prod
17
+
name: mariadb-app1-prod
18
18
namespace: prod-app
19
19
spec:
20
20
parameters:
@@ -32,7 +32,7 @@ spec:
32
32
name: my-secret
33
33
namespace: app4
34
34
writeConnectionSecretToRef:
35
-
name: postgres-creds
35
+
name: mariadb-creds
36
36
----
37
37
<1> Create a user and a database called app1, the user gets all privileges for the database
38
38
<2> Create a user app2 and giving it all privileges to database app1
@@ -46,13 +46,19 @@ To remove a user and its database, you need to remove it from the `access` array
46
46
47
47
A user or database will be removed from the instance, if there are no more references in the `access` array.
48
48
49
+
[IMPORTANT]
50
+
.Manual cleanup required
51
+
====
52
+
Removing users from the `access` array does NOT automatically delete the user, database, or grants from the MariaDB instance. These resources will remain in the database and must be manually deleted if no longer needed.
53
+
====
54
+
49
55
.Example Deleting Users and Databases
50
56
[source,yaml]
51
57
----
52
58
apiVersion: vshn.appcat.vshn.io/v1
53
59
kind: VSHNMariaDB
54
60
metadata:
55
-
name: pgsql-app1-prod
61
+
name: mariadb-app1-prod
56
62
namespace: prod-app
57
63
spec:
58
64
parameters:
@@ -63,14 +69,22 @@ spec:
63
69
database: app1 # <2>
64
70
- user: app3 #<3>
65
71
writeConnectionSecretToRef:
66
-
name: postgres-creds
72
+
name: mariadb-creds
67
73
----
68
74
<1> Removing this entry would remove the `app1` user and the grant giving it access to the app1 database. It will not remove the database, as it's still referenced by user app2.
69
75
<2> Removing this entry would remove the user `app2` and the grants giving access to database app1. It will not remove the database app1, as it's still referenced by user `app1`
70
76
<3> Removing this entry will remove the user `app3` and its database.
71
77
72
-
[IMPORTANT]
73
-
.Non-reversible operation
78
+
To manually clean up users, databases, and grants that are no longer managed:
79
+
80
+
. Remove the user and database from the claim
81
+
. Connect to your MariaDB instance using the connection details
82
+
. Revoke grants: `REVOKE ALL PRIVILEGES ON DATABASE databasename FROM username;`
83
+
. Drop the user: `DROP USER username;`
84
+
. Drop the database (if no longer needed): `DROP DATABASE databasename;`
85
+
86
+
[WARNING]
87
+
.Manual deletion is irreversible
74
88
====
75
-
If you remove a user completely from the array, the user and the database will be removed from the instance!
89
+
Manual deletion of users and databases is permanent and cannot be undone. Ensure you have backups and that the resources are truly no longer needed before deleting them. Renaming is also not possible. If a user is renamed, it will be treated as a new user, and the old user will remain in the database.
0 commit comments