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
1. After creating your ClickHouse Cloud Service, on the `Connect your app` screen, select MySQL from the drop down.
10
-
<br/>
9
+
<VerticalStepperheaderLevel="h4">
11
10
12
-
<Imagesize="md"img={mysql_1}alt="ClickHouse Cloud credentials screen showing MySQL interface selection dropdown"border />
11
+
#### Select `Connect your app`{#select-connect-your-app}
13
12
14
-
2. Toggle the switch to enable the MySQL interface for this specific service. This will expose port `3306` for this service and prompt you with your MySQL connection screen that include your unique MySQL username.
13
+
After creating your ClickHouse Cloud Service, on the `Connect your app`screen, select MySQL from the drop down.
15
14
16
-
<Imagesize="md"img={mysql_2}alt="ClickHouse Cloud MySQL interface enabling toggle and connection details"border />
17
-
<br/>
15
+
<Imagesize="lg"img={mysql_1}alt="ClickHouse Cloud credentials screen showing MySQL interface selection dropdown"border />
16
+
17
+
#### Enable the MySQL interface {#enable-mysql-interface}
18
+
19
+
Toggle the switch to enable the MySQL interface for this specific service.
20
+
This will expose port `3306` for this service and prompt you with a MySQL connection screen that includes your unique MySQL username.
21
+
22
+
<Imagesize="lg"img={mysql_2}alt="ClickHouse Cloud MySQL interface enabling toggle and connection details"border />
18
23
19
24
Alternatively, in order to enable the MySQL interface for an existing service:
20
25
21
-
3. Ensure your service is in `Running` state then click on the service you want to enable the MySQL interface for. Select "Connect" from the left menu:
26
+
#### Select `Connect`{#select-connect}
27
+
28
+
Ensure your service is in `Running` state then click on the service you want to enable the MySQL interface for.
29
+
Select "Connect" from the left menu:
30
+
31
+
<Imagesize="lg"img={mysql_3}alt="ClickHouse Cloud service connection screen with Connect option highlighted"border />
22
32
23
-
<br/>
24
-
<Imagesize="md"img={mysql_3}alt="ClickHouse Cloud service connection screen with Connect option highlighted"border />
25
-
<br/>
33
+
#### Choose `MySQL`{#choose-mysql}
26
34
27
-
4.Select MySQL from the `Connect With` drop down.
35
+
Select `MySQL` from the `Connect With` drop down.
28
36
29
-
<br/>
30
37
<Imagesize="md"img={mysql_4}alt="ClickHouse Cloud connection screen showing MySQL option selection"border />
31
-
<br/>
32
38
33
-
5. Toggle the switch to enable the MySQL interface for this specific service. This will expose port `3306` for this service and prompt you with your MySQL connection screen that include your unique MySQL username.
39
+
#### Enable the MySQL interface {#enable-mysql-interface}
40
+
41
+
Toggle the switch to enable the MySQL interface for this specific service.
42
+
This will expose port `3306` for this service and prompt you with your MySQL connection screen that include your unique MySQL username.
43
+
44
+
</VerticalStepper>
34
45
35
46
<Imagesize="md"img={mysql_5}alt="ClickHouse Cloud connection screen with MySQL interface enabled showing connection details"border />
36
47
37
-
## Creating multiple MySQL users in ClickHouse Cloud {#creating-multiple-mysql-users-in-clickhouse-cloud}
48
+
## Creating a readonly MySQL user in ClickHouse Cloud {#creating-multiple-mysql-users-in-clickhouse-cloud}
38
49
39
-
By default, there is a built-in `mysql4<subdomain>` user, which uses the same password as the `default` one. The `<subdomain>` part is the first segment of your ClickHouse Cloud hostname. This format is necessary to work with the tools that implement secure connection, but don't provide [SNI information in their TLS handshake](https://www.cloudflare.com/learning/ssl/what-is-sni), which makes it impossible to do the internal routing without an extra hint in the username (MySQL console client is one of such tools).
50
+
ClickHouse Cloud automatically creates a `mysql4<subdomain>` user that shares the same password as the default user.
51
+
The `<subdomain>` portion corresponds to the first part of your ClickHouse Cloud hostname.
40
52
41
-
Because of this, we _highly recommend_ following the `mysql4<subdomain>_<username>` format when creating a new user intended to be used with the MySQL interface, where `<subdomain>` is a hint to identify your Cloud service, and `<username>` is an arbitrary suffix of your choice.
53
+
This username format is required for compatibility with tools that establish secure connections but don't include [SNI (Server Name Indication)](https://www.cloudflare.com/learning/ssl/what-is-sni) data in their TLS handshake.
54
+
Without SNI information, the system cannot perform proper internal routing, so the subdomain hint embedded in the username provides the necessary routing information.
55
+
The MySQL console client is an example of a tool that requires this.
42
56
43
57
:::tip
44
-
For ClickHouse Cloud hostname like `foobar.us-east1.aws.clickhouse.cloud`, the `<subdomain>` part equals to `foobar`, and a custom MySQL username could look like `mysql4foobar_team1`.
58
+
A recommended best practice is to create a new readonly MySQL user.
45
59
:::
46
60
47
-
You can create extra users to use with the MySQL interface if, for example, you need to apply extra settings.
61
+
:::note
62
+
For a ClickHouse Cloud hostname like `foobar.us-east1.aws.clickhouse.cloud`, the `<subdomain>` part equals to `foobar`, and a custom MySQL username could look like `mysql4foobar_team1`.
63
+
:::
48
64
49
-
1. Optional - create a [settings profile](/sql-reference/statements/create/settings-profile) to apply for your custom user. For example, `my_custom_profile` with an extra setting which will be applied by default when we connect with the user we create later:
#### Create a readonly settings profile {#create-a-custom-settings-user}
54
68
55
-
`prefer_column_name_to_alias` is used just as an example, you can use other settings there.
56
-
2.[Create a user](/sql-reference/statements/create/user) using the following format: `mysql4<subdomain>_<username>` ([see above](#creating-multiple-mysql-users-in-clickhouse-cloud)). The password must be in double SHA1 format. For example:
69
+
Create a [settings profile](/sql-reference/statements/create/settings-profile) to apply to your readonly user,
70
+
setting the `readonly` setting to `1`:
57
71
58
-
```sql
59
-
CREATEUSERmysql4foobar_team1 IDENTIFIED WITH double_sha1_password BY 'YourPassword42$';
or if you want to use a custom profile for this user:
76
+
#### Create a new readonly MySQL user {#create-a-readonly-mysql-user}
63
77
64
-
```sql
65
-
CREATEUSERmysql4foobar_team1 IDENTIFIED WITH double_sha1_password BY 'YourPassword42$' SETTINGS PROFILE 'my_custom_profile';
66
-
```
78
+
[Create a user](/sql-reference/statements/create/user) with a name following this format:
67
79
68
-
where `my_custom_profile` is the name of the profile you created earlier.
69
-
3.[Grant](/sql-reference/statements/grant) the new user the necessary permissions to interact with the desired tables or databases. For example, if you want to grant access to `system.query_log` only:
80
+
```sql
81
+
mysql4<subdomain>_<username>
82
+
```
83
+
84
+
Apply the `readonly_profile` to the new user and make sure that the password is in double SHA1 format. For example:
85
+
86
+
```sql
87
+
CREATEUSERmysql4foobar_readonly
88
+
IDENTIFIED WITH double_sha1_password BY 'YourPassword42$'
89
+
SETTINGS PROFILE 'readonly_profile';
90
+
```
91
+
92
+
#### Grant the new user permissions to access the desired tables {#grant-the-new-user-the-necessary-permissions}
93
+
94
+
[Grant](/sql-reference/statements/grant) the new user the necessary permissions to interact with the desired tables or databases.
95
+
For example, if you want to grant access to `system.query_log` only:
96
+
97
+
```sql
98
+
GRANTSELECTONsystem.query_log TO mysql4foobar_readonly;
99
+
```
100
+
101
+
:::note
102
+
For the readonly user, make sure to only grant `SELECT` permissions to the tables you want to access.
103
+
:::
70
104
71
-
```sql
72
-
GRANTSELECTONsystem.query_log TO mysql4foobar_team1;
73
-
```
105
+
The newly created user can be used to connect to your ClickHouse Cloud service with the MySQL interface.
74
106
75
-
4. Use the created user to connect to your ClickHouse Cloud service with the MySQL interface.
107
+
</VerticalStepper>
76
108
77
109
### Troubleshooting multiple MySQL users in ClickHouse Cloud {#troubleshooting-multiple-mysql-users-in-clickhouse-cloud}
Copy file name to clipboardExpand all lines: docs/cloud/manage/backups/overview.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ On Day 1, a full backup is taken to start the backup chain. On Day 2, an increme
34
34
35
35
## Default backup policy {#default-backup-policy}
36
36
37
-
In the Basic, Scale, and Enterprise tiers, backups are metered and billed separately from storage. All services will default to one backup with the ability to configure more, starting with the Scale tier, via the Settings tab of the Cloud console.
37
+
In the Basic, Scale, and Enterprise tiers, backups are metered and billed separately from storage. All services will default to one daily backup with the ability to configure more, starting with the Scale tier, via the Settings tab of the Cloud console. Each backup will be retained for at least 24 hours.
38
38
39
39
## Backup status list {#backup-status-list}
40
40
@@ -169,6 +169,10 @@ SYNC SETTINGS max_table_size_to_drop=2097152 -- increases the limit to 2TB
169
169
```
170
170
:::
171
171
172
+
:::note
173
+
Legacy Plans: For customers on legacy plans, default daily backups retained for 24 hours, are included in the storage cost.
174
+
:::
175
+
172
176
## Configurable backups {#configurable-backups}
173
177
174
178
If you want to set up a backups schedule different from the default backup schedule, take a look at [Configurable Backups](./configurable-backups.md).
0 commit comments