How to create a mysql server using helm chart on LKE?

I can easily install MySQL helm chart [https://artifacthub.io/packages/helm/bitnami/mysql] in minikube. but when I try to create it on linode I get this error error: 'Can't connect to local MySQL server through socket '/opt/bitnami/mysql/tmp/mysql.sock' (2)

3 Replies

Linode Staff

Based on the error you're receiving, it looks like this may be a permissions issue. I was able to find this forum post from Bitnami which suggests a permissions misconfiguration in the /opt/bitnami/mysql directory:

#!/bin/bash

## 640 everything under data...
sudo chmod -R 640 /opt/bitnami/mysql/data

## ... except 750 for:
sudo chmod 750 /opt/bitnami/mysql/data/mysql
sudo chmod 750 /opt/bitnami/mysql/data/performance_schema

## 755 for /opt/bitnami/mysql/data
sudo chmod 755 /opt/bitnami/mysql/data

## tmp folder
sudo chmod 777 /opt/bitnami/mysql/tmp/
sudo chmod 777 /opt/bitnami/mysql/tmp/mysql.sock

##  644 for...
sudo chmod 644 /opt/bitnami/mysql/support-files/magic
sudo chmod 644 /opt/bitnami/mysql/bitnami/my-*.cnf

This additional resource is specific to MariaDB but may be helpful as well, especially since it deals directly with deploying using Helm. You may need to make changes to your chart dependency version and runAsUser to resolve this error. If these resources don't help, other users in the Linode Community may have further suggestions too!

Linode Staff

To add on to the above, I tried deploying the helm chart that you shared and encountered similar errors. I'm inclined to agree that this is likely due to a permission conflict. Running the chart locally on minikube likely has different permission access than when run in the hardened environment provided by our LKE Clusters.

For what it's worth, you can confirm that MySQL deployments work on your LKE cluster by following the Kubernetes.io guide for deploying MySQL with Persistent Volumes:

You just have to wait for about 5 minutes with a better server(8Gb 4 core). It works extremely fast on minikube, but it is slow on Linode if you don't have a fast Linode.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct