mysql-operator icon indicating copy to clipboard operation
mysql-operator copied to clipboard

Use MYSQL 5.6

Open ghost opened this issue 5 years ago • 5 comments

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:

  • Kubernetes version (use kubectl version):
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Others:

What happened?

What you expected to happen?

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

Anything else we need to know?

ghost avatar Dec 05 '19 18:12 ghost

8.0.11 is minimum this operator supports.

bweston92 avatar Dec 05 '19 19:12 bweston92

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

yanbaotong avatar Dec 20 '19 10:12 yanbaotong

@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

MONTATICH avatar Dec 20 '19 14:12 MONTATICH

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

yanbaotong avatar Dec 27 '19 03:12 yanbaotong

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.

cuijxin avatar Dec 31 '19 02:12 cuijxin