Home > Back-end >  Unable to run MYSQL 8.0 on AKS, getting the above errors [MY-012574] [InnoDB] Unable to lock ./#inno
Unable to run MYSQL 8.0 on AKS, getting the above errors [MY-012574] [InnoDB] Unable to lock ./#inno

Time:01-30

SCUnable to run MYSQL :8.0 on AKS using PVC, below is my manifest files

[STatefulsets SC

PVC

CodePudding user response:

Getting this error because the Azure file comes with a default user & permission which cant be modified by my MYSQL user name, we can use Azure-managed Share volume for this scenario

CodePudding user response:

I've just encountered a similar issue myself (when switching from mysql:5.5 to mysql:8).

The key to resolving it when using Azure Files appears to be setting the - nobrl setting on the StorageClass :

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
  name: mysql-sc-azurefile
provisioner: file.csi.azure.com
allowVolumeExpansion: true
mountOptions:
  - file_mode=0777
  - mfsymlinks
  - uid=999
  - dir_mode=0777
  - gid=999
  - actimeo=30
  - cache=strict
  - nobrl
parameters:
  skuName: Standard_LRS

Additionally, you may need to set the securityContext on the deployment to use 999 (to prevent mysql attempting to switch the user at startup) :

securityContext:
  runAsUser: 999
  runAsGroup: 999
  fsGroup: 999
  • Related