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
This page explains how to manage databases in your Data Warehouse for ClickHouse® deployment using the [Scaleway console](https://console.scaleway.com/).
13
-
14
-
<Messagetype="note">
15
-
During the private beta phase, database management can only be done with the **scwadmin** & via the ClickHouse® CLI, MySQL or HTTPS protocols.
16
-
</Message>
12
+
This page explains how to manage databases in your Data Warehouse for ClickHouse® deployment.
17
13
18
14
<Requirements />
19
15
@@ -24,14 +20,47 @@ During the private beta phase, database management can only be done with the **s
24
20
25
21
## How to manage databases using the Scaleway console
26
22
27
-
During the private beta phase, the management of databases in your Data Warehouse for ClickHouse® deployment is limited to viewing databases in your deployment.
23
+
The Scaleway console allows you to create and delete databases for your Data Warehouse for ClickHouse® deployment.
24
+
25
+
### How to create a database using the Scaleway console
26
+
27
+
1. Click **ClickHouse®** under **Data & Analytics** on the side menu. The Data Warehouse deployment page displays.
28
+
29
+
2. Click the name of the desired Data Warehouse deployment. The **Overview** tab of the deployment displays.
30
+
31
+
3. Click the **Databases** tab. A list of your current databases displays.
32
+
33
+
4. Click **+ Create database**. A popup displays.
34
+
35
+
5. Enter a name for your new database. It can can only contain alphanumeric characters, underscores, and dashes.
36
+
37
+
6. Click **Create database** to confirm.
38
+
39
+
Your new database appears in the list.
40
+
41
+
### How to delete a database using the Scaleway console
42
+
43
+
<Messagetype="note">
44
+
The `default` database cannot be deleted.
45
+
</Message>
46
+
47
+
1. Click **ClickHouse®** under **Data & Analytics** on the side menu. The Data Warehouse deployment page displays.
48
+
49
+
2. Click the name of the desired Data Warehouse deployment. The **Overview** tab of the deployment displays.
50
+
51
+
3. Click <Iconname="delete" /> next to the name of the database you want to delete. A confirmation popup displays.
52
+
53
+
4. Enter `DELETE`, then click **Delete database** to confirm.
54
+
55
+
The deleted database no longer appears in the list.
28
56
29
57
## How to manage databases using frameworks
30
58
31
-
[Connect to your deployment](/data-warehouse/how-to/connect-applications/) using your preferred framework.
32
-
<Messagetype="tip">
33
-
You can also connect using the ClickHouse HTTP console from the **Overview** tab of your deployment. Make sure to enter valid credentials in the top-right fields.
34
-
</Message>
59
+
[Connect to your deployment](/data-warehouse/how-to/connect-applications/) using your preferred framework.
60
+
61
+
<Messagetype="tip">
62
+
You can also connect using the ClickHouse HTTP console from the **Overview** tab of your deployment. Make sure to enter valid credentials in the top-right fields.
63
+
</Message>
35
64
36
65
Once connected, you can run SQL queries to `CREATE/ALTER/DROP` your `DATABASE/TABLE`.
This page explains how to manage users in your Data Warehouse for ClickHouse® deployment using the [Scaleway console](https://console.scaleway.com/).
13
-
14
-
<Messagetype="note">
15
-
During the private beta phase, user management can only be done with the **scwadmin** user via the ClickHouse® CLI, MySQL or HTTPS protocols.
16
-
</Message>
12
+
This page explains how to manage users in your Data Warehouse for ClickHouse® deployment.
17
13
18
14
<Requirements />
19
15
@@ -24,9 +20,53 @@ During the private beta phase, user management can only be done with the **scwad
24
20
25
21
## How to manage users using the Scaleway console
26
22
27
-
During the private beta phase, the management of users for your Data Warehouse for ClickHouse® deployment is limited to:
28
-
- Viewing users in your deployment
29
-
- Changing the password of an existing user
23
+
The Scaleway console allows you to create users for your Data Warehouse for ClickHouse® deployment, to grant them admin rights, to update their password, and to delete them.
24
+
25
+
### How to create a user using the Scaleway console
26
+
27
+
1. Click **ClickHouse®** under **Data & Analytics** on the side menu. The Data Warehouse deployment page displays.
28
+
29
+
2. Click the name of the desired Data Warehouse deployment. The **Overview** tab of the deployment displays.
30
+
31
+
3. Click the **Users** tab. A list of your current users displays.
32
+
33
+
4. Click **+ Create user**. A popup displays.
34
+
35
+
5. Enter a username. It must be unique can contain up to 63 characters, and must start with a letter. Only alphanumeric characters, underscores, and dashes are accepted.
36
+
37
+
6. Enter a password, or generate one automatically.
38
+
39
+
7. Enable the toggle if you want to grant admin rights to the user.
40
+
41
+
8. Click **Create user** to proceed.
42
+
43
+
The newly created user appears in the list of your deployment's users.
44
+
45
+
### How to update a user's password and admin rights
46
+
47
+
1. Click **ClickHouse®** under **Data & Analytics** on the side menu. The Data Warehouse deployment page displays.
48
+
49
+
2. Click the name of the desired Data Warehouse deployment. The **Overview** tab of the deployment displays.
50
+
51
+
3. Click the **Users** tab. A list of your current users displays.
52
+
53
+
4. Click <Iconname="more" /> next to the name of the user you want to update, then click ¨**Update user**. A popup displays.
54
+
55
+
5. Update the user's password and/or admin rights, then click **Update user** to confirm.
56
+
57
+
### How to delete a user using the Scaleway console
58
+
59
+
1. Click **ClickHouse®** under **Data & Analytics** on the side menu. The Data Warehouse deployment page displays.
60
+
61
+
2. Click the name of the desired Data Warehouse deployment. The **Overview** tab of the deployment displays.
62
+
63
+
3. Click the **Users** tab. A list of your current users displays.
64
+
65
+
4. Click <Iconname="delete" /> next to the name of the user you want to delete. A confirmation popup displays.
66
+
67
+
5. Enter `DELETE`, then click **Delete user** to confirm.``
68
+
69
+
The user is deleted and no longer appears in the list.
30
70
31
71
## How to manage users using frameworks
32
72
@@ -37,4 +77,52 @@ During the private beta phase, the management of users for your Data Warehouse f
37
77
38
78
Once connected, you can run SQL queries using `USER`, `ROLE`, and `ROW POLICY` to create new users and grant them the desired permissions via roles.
39
79
40
-
Refer to the official ClickHouse® documentation on [users and roles](https://clickhouse.com/docs/sql-reference/statements/create/user) for more information.
80
+
Refer to the official ClickHouse® documentation on [users and roles](https://clickhouse.com/docs/sql-reference/statements/create/user) for more information.
81
+
82
+
## Manage user permissions
83
+
84
+
[Connect to your deployment](/data-warehouse/how-to/connect-applications/) using your preferred framework.
85
+
86
+
Once connected, you can run SQL as shown below to grant the desired permissions to users.
87
+
88
+
**Grant permission to create databases**
89
+
90
+
```sql
91
+
GRANT CREATE DATABASE ON . TO user;
92
+
```
93
+
94
+
**Grant permission to create tables in any database**
95
+
96
+
```sql
97
+
GRANT CREATE TABLE ON . TO user;
98
+
```
99
+
100
+
**Grant permission to create tables in a specific database**
101
+
102
+
```sql
103
+
GRANT CREATE TABLE ON database_name.* TO user;
104
+
```
105
+
106
+
**Grant data manipulation permissions for any table in any database**
107
+
108
+
```sql
109
+
GRANT INSERT, UPDATE, DELETEON . TO user;
110
+
```
111
+
112
+
**Grant data manipulation permissions for any table in a specific database**
113
+
114
+
```sql
115
+
GRANT INSERT, UPDATE, DELETEON database_name.* TO user;
116
+
```
117
+
118
+
**Grant data manipulation permissions for a specific table in a specific database**
119
+
120
+
```sql
121
+
GRANT INSERT, UPDATE, DELETEONdatabase_name.table_name TO user;
122
+
```
123
+
124
+
**Grant every permissions on every database**
125
+
126
+
```sql
127
+
GRANT CREATE DATABASE, CREATE TABLE, INSERT, UPDATE, DELETEON . TO user;
0 commit comments