Skip to content

Commit

Permalink
docs: root user example (#12396)
Browse files Browse the repository at this point in the history
* Update 02-deploying-databend.md

* Update 02-deploying-databend.md
  • Loading branch information
soyeric128 authored Aug 9, 2023
1 parent b685bfb commit 33f9b77
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions docs/doc/10-deploy/02-deploying-databend.md
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,19 @@ root = "/analyses/databend/storage"
</TabItem>
</Tabs>

c. Configure an admin user in the [query.users] section. For more information, see [Configuring Admin Users](../13-sql-clients/00-admin-users.md).
c. Configure an admin user with the [query.users] sections. For more information, see [Configuring Admin Users](../13-sql-clients/00-admin-users.md). To proceed with the default root user and the authentication type "no_password", ensure that you remove the '#' character before the following lines in the file `databend-query.toml`:

:::caution
Using "no_password" authentication for the root user in this tutorial is just an example and not recommended for production due to potential security risks.
:::

```toml title='databend-query.toml'
...
[[query.users]]
name = "root"
auth_type = "no_password"
...
```

d. Open a terminal window and navigate to the folder `/usr/local/databend/bin`.

Expand All @@ -585,22 +597,6 @@ a. Download and install a MySQL client on your local machine.

b. Create a connection to 127.0.0.1 from your SQL client. In the connection, set the port to `3307`, and set the username to `root`.

:::tip

**Create new users**. The `root` user only works when you access Databend from localhost. You will need to create new users and grant proper privileges first to connect to Databend remotely. For example,

```sql
-- Create a user named "eric" with the password "databend"
CREATE USER eric IDENTIFIED BY 'databend';

-- Grant the ALL privilege on all existing tables in the default database to the user eric:
GRANT ALL ON default.* TO eric;
```

For more information about creating new users, see [CREATE USER](../14-sql-commands/00-ddl/30-user/01-user-create-user.md).

:::

c. Run the following commands and check if the query is successful:

```sql
Expand Down

1 comment on commit 33f9b77

@vercel
Copy link

@vercel vercel bot commented on 33f9b77 Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

databend – ./

databend.vercel.app
databend-databend.vercel.app
databend-git-main-databend.vercel.app
databend.rs

Please sign in to comment.