dosubot[bot] commented on issue #33225:
URL: https://github.com/apache/superset/issues/33225#issuecomment-2826160147
<!-- Greeting -->
Hello @WibowoS26! I'm here to help you solve bugs, answer questions, and
navigate your way to becoming a contributor. While you're waiting for a human
maintainer, feel free to ask me anything you need assistance with!
<!-- Answer -->
To resolve the issue of the missing MySQL connector in Superset 5.0.0-rc2
due to a failure to build `mysqlclient` because of missing `pkg-config`, you
need to ensure that `pkg-config` is installed in the Docker container. You can
modify your Dockerfile to include the installation of `pkg-config` as follows:
```dockerfile
# Ensure pkg-config is installed
RUN /app/docker/apt-install.sh pkg-config
# Ensure mysqlclient is installed
RUN pip install mysqlclient
```
Make sure to rebuild your Docker image after making these changes.
Additionally, if you are deploying Superset in a Kubernetes environment, you
can modify your `values.yaml` file to include a bootstrap script that installs
the necessary system-level dependencies and Python packages for MySQL support:
```yaml
bootstrapScript: |
#!/bin/bash
# Install system-level dependencies
apt-get update && apt-get install -y \
python3-dev \
default-libmysqlclient-dev \
build-essential \
pkg-config
# Install required Python packages
pip install \
authlib \
psycopg2-binary \
mysqlclient
# Create bootstrap file if it doesn't exist
if [ ! -f ~/bootstrap ]; then
echo "Running Superset with uid {{ .Values.runAsUser }}" > ~/bootstrap
fi
```
This script will ensure that both the system-level dependencies and the
required Python packages are installed, enabling MySQL support in Superset
<sup>[[1]](https://github.com/apache/superset/blob/master/docs/docs/configuration/databases.mdx)</sup><sup>[[2]](https://github.com/apache/superset/blob/master/Dockerfile)</sup><sup>[[3]](https://github.com/apache/superset/discussions/31431)</sup>.
<!-- Dosu Comment Footer -->
*To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
---
<sup>Help Dosu learn! Give it feedback: [Great
Response](https://app.dosu.dev/response-feedback/7473fbac-758f-49a3-975f-e0543d4441d5?feedback_type=great_response)
| [Irrelevant
Answer](https://app.dosu.dev/response-feedback/7473fbac-758f-49a3-975f-e0543d4441d5?feedback_type=irrelevant_answer)
| [Incorrect
Sources](https://app.dosu.dev/response-feedback/7473fbac-758f-49a3-975f-e0543d4441d5?feedback_type=incorrect_sources)
| [Too
Verbose](https://app.dosu.dev/response-feedback/7473fbac-758f-49a3-975f-e0543d4441d5?feedback_type=too_verbose)
|
[Hallucination](https://app.dosu.dev/response-feedback/7473fbac-758f-49a3-975f-e0543d4441d5?feedback_type=hallucination)
| [Bug
Report](https://app.dosu.dev/response-feedback/7473fbac-758f-49a3-975f-e0543d4441d5?feedback_type=bug_report)
|
[Other](https://app.dosu.dev/response-feedback/7473fbac-758f-49a3-975f-e0543d4441d5?feedback_type=other)</sup>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]