oracle / mysql-operator

Create, operate and scale self-healing MySQL clusters in Kubernetes
870 stars 235 forks source link

Use MYSQL 5.6 #297

Open ghost opened 4 years ago

ghost commented 4 years ago

Is this a BUG REPORT or FEATURE REQUEST?

NO I'm wondering is is possible to use MYSQL 5.6 instead of the default version 8. If yes where can I edit that ? Thanks

Versions

MySQL Operator Version:

Environment:

What happened?

What you expected to happen?

How to reproduce it (as minimally and precisely as possible)?

Anything else we need to know?

bweston92 commented 4 years ago

8.0.11 is minimum this operator supports.

yanbaotong commented 4 years ago

1.Configure configmap in the operator

apiVersion: v1 kind: ConfigMap metadata: name: mysql-operator-config namespace: clouddb labels: app: mysql-operator data: mysql-operator-config.yaml: | images: defaultMysqlServer: **/mysql/mysql-server 2.Specify version in cluster

ghost commented 4 years ago

@swcsg Thanks for your comment. Do I have to make both changes 1 and 2 or either will work Because I tried #2 like this

apiVersion: mysql.oracle.com/v1alpha1 kind: Cluster metadata: name: mysql-enterprise spec: version: "5.6" repository: store/oracle/mysql-enterprise-server

but I didn't know which repository to use

yanbaotong commented 4 years ago

apiVersion: v1 kind: ConfigMap metadata: name: mysql-operator-config namespace: clouddb labels: app: mysql-operator data: mysql-operator-config.yaml: | images: defaultMysqlServer: !!!your repository!!!

cuijxin commented 4 years ago

When after I created this configmap, should I recreate mysql-opeartor? I create configmap use this yaml:

apiVersion: v1
kind: ConfigMap
metadata:
  name: mysql-operator-config
  namespace: mysql-operator
  labels:
    app: mysql-operator
data:
  mysql-operator-config.yaml: |
    images:
      defaultMysqlServer: mysql/mysql-server

and I create cluster use this yaml:

apiVersion: mysql.oracle.com/v1alpha1
kind: Cluster
metadata:
  name: mysql-test
  namespace: mysql-operator
spec:
  version: 5.7.20-1.1.2
  members: 1

but, I got error "E1231 02:46:46.139155 1 controller.go:291] error syncing 'mysql-operator/mysql-test': validating Cluster: spec.version: Invalid value: "5.7.20-1.1.2": minimum supported MySQL version is 8.0.11" finally.