Skip to content
molliezhang edited this page Dec 30, 2021 · 6 revisions

If you have a question that isn't listed below, please create an issue and we will do response and then add in this document if necessary.


Account Management

RadonDB MySQL uses xenoncli to complete account management operations.

1. How to use root account?

For helm version(source of qke appstore or charts/helm), you should do as steps:
1. set `allowEmptyRootPassword` to false.
2. cancel the comment of `mysqlRootPassword` and set the password.

2. How to create a new super account?

After the cluster is deployed, enter the xenon container of any node and execute the following command.

```
// SSL should be YES or NO.
xenoncli mysql createsuperuser <userName> <Host> <PassWord> <SSL>
```
The super account authorization information is as follows:

```
+------------------------------------------------------------------+
| Grants for testSuper@%                                           |
+------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'testSuper'@'%' WITH GRANT OPTION |
+------------------------------------------------------------------+
```

3. How to create a new normal account with privileges?

enter the xenon container of any node and execute the following command.

only create.

```
xenoncli mysql createuser <userName> <Host> <PassWord> <SSL>
```

create with privileges.
```
//privs: for example:SELECT,CREATE(comma-separated)
xenoncli mysql createuserwithgrants --user=<userName> --passwd=<PassWord> --database=<DatabaseName> --table=<TableName> --host=<Host> --privs=<privileges> --ssl=<SSL>
```

4. How to drop account?

enter the xenon container of any node and execute the following command.

```
xenoncli mysql dropuser <userName> <Host>
```

5. How to changepassword?

enter the xenon container of any node and execute the following command.

```
xenoncli mysql changepassword <userName> <Host> <NewPassword>
```

用户帐号问题

RadonDB MySQL 使用 xenoncli 完成账户管理操作。

1. 如何使用root账号?

对于 helm 版本(通过 qke appstore 或 charts/helm 安装),您应该按照以下步骤操作:

1. 将 `allowEmptyRootPassword` 设置为 false。

2. 取消`mysqlRootPassword`的注释并设置密码。

2. 如何创建一个新的超级账号?

集群部署成功后,进入任意节点的 xenon 容器,执行如下命令。

```
// SSL 应该是 YES 或 NO。
xenoncli mysql createsuperuser <userName> <Host> <PassWord> <SSL>
```

超级账号授权信息如下:
```
+------------------------------------------------------------------+
| Grants for testSuper@%                                           |
+------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'testSuper'@'%' WITH GRANT OPTION |
+------------------------------------------------------------------+
```

3. 如何新建一个普通账号并授权?

进入任意节点的 xenon 容器,执行以下命令。

```
// 只创建
xenoncli mysql createuser <userName> <Host> <PassWord> <SSL>
```

```
// 创建并授权
// privs 示例:SELECT,CREATE(逗号分隔)
xenoncli mysql createuserwithgrants --user=<userName> --passwd=<PassWord> --database=<DatabaseName> --table= 

--host= --privs= --ssl=< SSL> ```

4. 如何删除账号?

进入任意节点的 xenon 容器,执行以下命令。

```
xenoncli mysql dropuser <userName> <Host>
```

5. 如何更改密码?

进入任意节点的 xenon 容器,执行以下命令。

```
xenoncli mysql changepassword <userName> <Host> <NewPassword>
```
Clone this wiki locally