How to create new database and user with the chart

Description:

We are exploring GitHub - percona/percona-xtradb-cluster-operator: Percona Operator for MySQL based on Percona XtraDB Cluster to set up mysql cluster. Now I am looking to create an user(s) and empty databases along with the installation. Is there something documented in some blog post/article somewhere that I can follow?

Steps to Reproduce:

Install the cluster, no option to create an empty database or user is there.

Version:

v1.13.0

Logs:

Expected Result:

NA

Actual Result:

NA

Additional Information:

NA

Hello @sohamc,
Check out our official documentation on the PXC Operator.

1 Like

Hi,

Thank you for replying.

I did look through the documentation but didn’t find any option to create any user or database along with the installation. Do we need to do this outside of the cluster installation?

Thanks,

1 Like

Hello @sohamc,
Yes, typically you would log into MySQL and CREATE DATABASE and CREATE USER.

1 Like

@sohamc - right now this is not supported in our MySQL Operator. But it is our top pick in the roadmap: [K8SPXC-377] Create MySQL users through operator · Issue #9 · percona/roadmap · GitHub

1 Like

Thank you, looking forward to it.

Hi @Sergey_Pronin, in Is there a built-in way to get "CREATE DATABASE app;" and app user created? - #3 by Sergey_Pronin you said that this can be easily solved by automation tools. Can you please share couple (any) examples that I can go through and try to implement?

Also is there any ETA on the expected release of [K8SPXC-377] Create MySQL users through operator · Issue #9 · percona/roadmap · GitHub? Not looking for any set in stone date, just an expectation in terms of Q1/Q2 or something like that.

@sohamc well, apart from just connecting to the database and executing the “create …” statements, I don’t have anything.
Also there are some teams using liquibase or similar products to create schemas.

As for ETA - Q2/Q3 more likely, unless someone from the community does it earlier.