You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "2308087369 (via GitHub)" <gi...@apache.org> on 2025/07/31 01:47:07 UTC

[I] Built by PyPI: Missing MySQL connection and icon [superset]

2308087369 opened a new issue, #34417:
URL: https://github.com/apache/superset/issues/34417

   ### Bug description
   
   1. **Env**: Python 3.11.13 by conda
       sys: Ubuntu 22.04
       user: root
   2. **Build flow(https://superset.apache.org/docs/installation/pypi)**: 
   - sudo apt-get install build-essential libssl-dev libffi-dev python3-dev python3-pip libsasl2-dev libldap2-dev default-libmysqlclient-dev
   - pip install apache_superset
   - export SUPERSET_SECRET_KEY=< ...  > . 
   - export FLASK_APP=superset
   - superset db upgrade
   - superset fab create-admin
   - superset load_examples
   - superset init
   - superset run -p 8088 --with-threads --reload --debugger
   **Additional:**
   - pip install mysqlclient mysql-connector-python    
   3. **BUG**: When selecting Connect to a Database, neither the optional database icon nor the drop-down box includes MySQL. Connecting via <UserName>mysql://:<DBPassword>@<Database Host>/<Database Name> shows connection failure
   4. **Solution**:  
   '''bash
   export LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6
   '''
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   master / latest-dev
   
   ### Python version
   
   3.11
   
   ### Node version
   
   16
   
   ### Browser
   
   Chrome
   
   ### Additional context
   
   _No response_
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
   - [x] 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.


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Built by PyPI: Missing MySQL connection and icon [superset]

Posted by "2308087369 (via GitHub)" <gi...@apache.org>.
2308087369 closed issue #34417: Built by PyPI: Missing MySQL connection and icon
URL: https://github.com/apache/superset/issues/34417


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Built by PyPI: Missing MySQL connection and icon [superset]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #34417:
URL: https://github.com/apache/superset/issues/34417#issuecomment-3138312069

   <!-- Greeting -->
   Hi @2308087369! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.
   
   <!-- Answer -->
   MySQL is missing from the connection options because, starting with Superset 4.1.0, database drivers like `mysqlclient` are no longer bundled by default—you have to install them yourself for MySQL support to appear in the UI. Even though you ran `pip install mysqlclient`, in some environments (especially with conda or when running as root), the package may not be visible to the Python interpreter that runs Superset, or system dependencies may be missing or mismatched. This is the most common cause of the missing MySQL icon and dropdown option [[1]](https://github.com/apache/superset/issues/33875) [[2]](https://github.com/apache/superset/discussions/31431).
   
   Here’s what to check:
   
   1. Make sure all required system dependencies are installed:  
      `sudo apt-get install build-essential python3-dev default-libmysqlclient-dev pkg-config`
   2. Reinstall `mysqlclient` in the exact Python environment where Superset runs (activate your conda env if using one):  
      `pip install --force-reinstall --no-cache-dir mysqlclient`
   3. Restart Superset after installation.
   4. If MySQL still doesn’t appear, check the Superset logs for errors like `No module named 'MySQLdb'`. This indicates `mysqlclient` is still not accessible to Superset [[3]](https://github.com/apache/superset/issues/33241).
   
   Note: Installing only `mysql-connector-python` is not enough—Superset expects the `MySQLdb` dialect provided by `mysqlclient` for full MySQL support. Using `mysql-connector-python` can cause compatibility issues and is not the default or recommended driver [[4]](https://github.com/apache/superset/issues/33157).
   
   The `LD_PRELOAD` workaround is not a standard or documented fix for this issue and is unlikely to help unless you have a very specific library loading problem, which is rare in this context.
   
   If you still don’t see MySQL after these steps, double-check that you’re running Superset in the same environment where you installed `mysqlclient`, and share any relevant error logs for further troubleshooting.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/aa5c2288-6657-48d9-bbbf-7bf5791ed349?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/aa5c2288-6657-48d9-bbbf-7bf5791ed349?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/aa5c2288-6657-48d9-bbbf-7bf5791ed349?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/aa5c2288-6657-48d9-bbbf-7bf5791ed349?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/aa5c2288-6657-48d9-bbbf-7bf5791ed349?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/aa5c2288-6657-48d9-bbbf-7bf5791ed349?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/aa5c2288-6657-48d9-bbbf-7bf5791ed349?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=githu
 b)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/34417)


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Built by PyPI: Missing MySQL connection and icon [superset]

Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on issue #34417:
URL: https://github.com/apache/superset/issues/34417#issuecomment-3150045926

   @2308087369 Feel free to open a pr to update the docs with this as a note or warning. Might help some people in the future.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Built by PyPI: Missing MySQL connection and icon [superset]

Posted by "2308087369 (via GitHub)" <gi...@apache.org>.
2308087369 commented on issue #34417:
URL: https://github.com/apache/superset/issues/34417#issuecomment-3142042898

   @rusackas This simple solution solved my problem and allowed me to connect to MYSQL normally. For server deployment using a conda-created virtual environment, ensure all compilation and dependencies are installed exclusively via pip (avoid mixing conda and pip). After compiling according to PyPI documentation, install MySQL dependencies with `pip install mysqlclient mysql-connector-python`, then resolve runtime library conflicts by exporting `LD_PRELOAD=/lib/x86_64-linux-gnu/libstdc++.so.6` to prioritize loading the specific GNU C++ standard library version required by the program.
           


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Built by PyPI: Missing MySQL connection and icon [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #34417:
URL: https://github.com/apache/superset/issues/34417#issuecomment-3140723031

   @2308087369 sounds like you have it working then? I don't recall our docs specifically going into Conda details, but if you want to open a PR adding some detail to the installation docs to more officially support Conda (or just add clarity for those running into this) it would surely be appreciated!


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Built by PyPI: Missing MySQL connection and icon [superset]

Posted by "2308087369 (via GitHub)" <gi...@apache.org>.
2308087369 commented on issue #34417:
URL: https://github.com/apache/superset/issues/34417#issuecomment-3138319769

   Thanks @dosu, I mentioned in my description that I pip installed two related dependencies for mysql, but it didn't work. The next step is to set the environment variables LD_PRELOAD make the mysql connection normal


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org