From 33f9b779daf2514927862abee8ac9ab47e6a091b Mon Sep 17 00:00:00 2001 From: soyeric128 Date: Wed, 9 Aug 2023 22:35:19 +0800 Subject: [PATCH] docs: root user example (#12396) * Update 02-deploying-databend.md * Update 02-deploying-databend.md --- docs/doc/10-deploy/02-deploying-databend.md | 30 +++++++++------------ 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/docs/doc/10-deploy/02-deploying-databend.md b/docs/doc/10-deploy/02-deploying-databend.md index 56f1faf74f509..aa405e17753c2 100644 --- a/docs/doc/10-deploy/02-deploying-databend.md +++ b/docs/doc/10-deploy/02-deploying-databend.md @@ -561,7 +561,19 @@ root = "/analyses/databend/storage" -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`. @@ -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