Bug description

When I try to connect mysql in web. I cannot choose mysql in web:

Image

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  Join Discord Share on X

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

Image

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 superset_app | view_func=lambda kw: self_ref().send_static_file(**kw), # type: ignore # noqa: B950 superset_app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/scaffold.py", line 317, in send_static_file superset_app | return send_from_directory( superset_app | ^^^^^^^^^^^^^^^^^^^^ superset_app | File "/app/.venv/lib/python3.11/site-packages/flask/helpers.py", line 557, in send_from_directory superset_app | return werkzeug.utils.send_from_directory( # type: ignore[return-value] superset_app | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ superset_app | File "/app/.venv/lib/python3.11/site-packages/werkzeug/utils.py", line 575, in send_from_directory superset_app | raise NotFound() superset_app | werkzeug.exceptions.NotFound: 404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. superset_app | 2025-06-24 06:49:44,798:INFO:werkzeug:10.10.72.108 - - [24/Jun/2025 06:49:44] "GET /static/assets/images/loading.gif HTTP/1.1" 404 - superset_app | 2025-06-24 06:49:52,395:INFO:werkzeug:127.0.0.1 - - [24/Jun/2025 06:49:52] "GET /health HTTP/1.1" 200 -

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:

  1. Make sure you’re accessing Superset on port 9000 (http://localhost:9000), not 8088. Recent versions serve assets on 9000 by default reference.
  2. 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 the superset_app logs for webpack or asset build completion messages reference.
  3. If assets are still missing after a long wait, try running npm install and npm run build manually in the superset-frontend directory inside the container, then restart Superset.
  4. 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 install mysqlclient as usual reference.
  5. Double-check you’re using the new Docker Compose file names (compose.yml instead of docker-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  Join Discord Share on X

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