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
Databend provides support for MySQL compatible CLI and GUI clients where you can connect to Databend and execute queries from.
9
+
10
+
:::note
11
+
Databend is not a complete implementation of the MySQL protocol, so certain programs such as some ORM frameworks may not be able to connect to Databend.
12
+
:::
13
+
14
+
To connect to Databend with MySQL compatible clients, you will need to connect to port 3307 with a SQL user created in Databend.
15
+
16
+
This example connects to a remote Databend with a SQL user named `databend`:
17
+
18
+
```shell
19
+
mysql -h172.20.0.2 -udatabend -P3307 -pdatabend
20
+
```
21
+
22
+
This example connects to a local Databend with the user `root`:
23
+
24
+
```shell
25
+
mysql -h127.0.0.1 -uroot -P3307
26
+
```
27
+
28
+
## Built-in Accounts
29
+
30
+
There are four built-in accounts in Databend that can be accessed from a local machine without requiring a password. These accounts are immutable and possess the highest level of privileges, meaning their settings cannot be altered or removed. Additionally, it is not possible to change or update their passwords.
DBeaver is a universal database management tool for everyone who needs to work with data in a professional way. With DBeaver you are able to manipulate with your data like in a regular spreadsheet, create analytical reports based on records from different data storages, export information in an appropriate format.
40
+
41
+
The following steps show how to establish a connection to Databend with DBeaver.
42
+
43
+
1. Create a SQL user in Databend.
44
+
45
+
```sql
46
+
CREATEUSERuser1 IDENTIFIED BY 'abc123';
47
+
GRANT ALL ON*.* TO user1;
48
+
```
49
+
50
+
2. In DBeaver, choose a driver for the new connection. Select `MySQL`, then click **Next**.
[bendsql](https://github.com/databendcloud/bendsql) is a command line tool that has been designed specifically for Databend. It allows users to establish a connection with Databend and execute queries directly from a CLI window.
9
+
10
+
This tool is particularly useful for those who prefer a command line interface and need to work with Databend on a regular basis. With bendsql, users can easily and efficiently manage their databases, tables, and data, and perform a wide range of queries and operations with ease.
11
+
12
+
## Downloading and Installing bendsql
13
+
14
+
To download and install bendsql, please go to the [bendsql](https://github.com/databendcloud/bendsql) repository on GitHub and follow the README instructions.
15
+
16
+
## Connecting to Databend
17
+
18
+
Use `bendsql connect` to connect to a Databend instance:
19
+
20
+
```shell
21
+
eric@ericdeMacBook rsdoc % bendsql connect -h
22
+
Connect to Databend Instance
23
+
24
+
USAGE
25
+
bendsql connect [flags]
26
+
27
+
FLAGS
28
+
-d, --database string (default "default")
29
+
-H, --host string (default "localhost")
30
+
-p, --password string
31
+
-P, --port int (default 8000)
32
+
--ssl
33
+
-u, --user string (default "root")
34
+
35
+
INHERITED FLAGS
36
+
--help Show helpforcommand
37
+
38
+
LEARN MORE
39
+
Use 'bendsql <command> <subcommand> --help'for more information about a command.
40
+
```
41
+
42
+
To connect to a local Databend, simply run `bendsql connect`:
0 commit comments