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.


Q: 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.

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

```test
+------------------------------------------------------------------+
| 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.

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

create with privileges.

```shell
//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.

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

5. How to changepassword?

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

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

Q: Version Upgrade

1. How to install the specified version?

CHART VERSION APP VERSION
0.1.0 v2.1.0
0.1.1 latest

example for installing version v2.1.0.

helm repo add radondb https://radondb.github.io/radondb-mysql-kubernetes/
helm insatll demo radondb/mysql-operator --version 0.1.0                   

2. How to upgrade the cluster version?

Example for upgrading v2.1.0 to the latest version.

  1. Update operator

    $ helm repo update
    $ helm upgrade demo radondb/mysql-operator --version 0.1.1
  2. Apply new CRD

    Use latest version code.

    $ kubectl apply -f https://raw.githubusercontent.com/radondb/radondb-mysql-kubernetes/main/charts/mysql-operator/crds/mysql.radondb.com_mysqlclusters.yaml

    Notices

    If the CRD between the two versions does not change, this step is not required.

  3. Apply new CR

    $ kubectl apply -f https://raw.githubusercontent.com/radondb/radondb-mysql- 
    $ kubernetes/main/config/samples/mysql_v1alpha1_mysqlcluster.yaml
Clone this wiki locally