Bug description
When I try to connect mysql in web. I cannot choose mysql in web:
I use docker compose to install tag 5.0.0
Screenshots/recordings
No response
Superset version
master / latest-dev
Python version
3.9
Node version
16
Browser
Chrome
Additional context
No response
Checklist
- [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [ ] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Comment From: dosubot[bot]
MySQL is missing from the connection options because the required driver is not installed in your Docker image. Starting with Superset 4.1.0, database drivers like MySQL are no longer included by default—you need to add them yourself for MySQL support to appear in the UI reference.
To fix this:
1. Create a file called requirements-local.txt
in your docker
directory (if it doesn’t exist).
2. Add either mysqlclient
or mysql-connector-python
to that file.
3. Rebuild your Docker image and restart Superset.
Example:
echo "mysqlclient" >> docker/requirements-local.txt
docker compose build --force-rm
docker compose up
If you get errors about missing system dependencies (like default-libmysqlclient-dev
), you’ll need to create a custom Dockerfile that installs those before the Python package reference.
If MySQL still doesn’t show up, check your Superset logs for any errors about missing MySQL drivers and share them here for more help.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: mlzxdzl
@dosu when i complete execute following commands: "mysqlclient" >> docker/requirements-local.txt docker compose build --force-rm docker compose up
I access the web , I can not enter the web
and it have error log
superset_app | 2025-06-24 06:49:44,760:INFO:werkzeug:10.10.72.108 - - [24/Jun/2025 06:49:44] "GET /superset/welcome/ HTTP/1.1" 200 -
superset_app | 2025-06-24 06:49:44,797:WARNING:superset.views.error_handling:HTTPException
superset_app | Traceback (most recent call last):
superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
superset_app | rv = self.dispatch_request()
superset_app | ^^^^^^^^^^^^^^^^^^^^^^^
superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
superset_app | return self.ensure_sync(self.view_functions[rule.endpoint])(view_args)
superset_app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/app.py", line 502, in
Comment From: dosubot[bot]
The 404 error for /static/assets/images/loading.gif
and the broken UI usually means the frontend static assets are still building or didn't build correctly. Here’s what to check and try:
- Make sure you’re accessing Superset on port 9000 (http://localhost:9000), not 8088. Recent versions serve assets on 9000 by default reference.
- Wait for the frontend build to finish. Even after
docker compose up
says it’s done, the container may still be building assets in the background. Watch thesuperset_app
logs for webpack or asset build completion messages reference. - If assets are still missing after a long wait, try running
npm install
andnpm run build
manually in thesuperset-frontend
directory inside the container, then restart Superset. - For MySQL support, make sure your Docker image installs all required system dependencies before installing
mysqlclient
. You may need to extend your Dockerfile with:dockerfile RUN apt-get update && apt-get install -y python3-dev default-libmysqlclient-dev build-essential pkg-config
Then installmysqlclient
as usual reference. - Double-check you’re using the new Docker Compose file names (
compose.yml
instead ofdocker-compose.yml
) as recent changes renamed these files reference.
If you still see 404s or broken UI after these steps, check the earlier logs for errors during the build, especially related to static asset compilation or Python package installation. Let me know if you spot any errors or if the problem persists!
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
Comment From: rusackas
I believe the bot is 100% correct on all counts, but let us know if you find otherwise.
Comment From: mlzxdzl
Thanks for your help