superset Database on mysql Unexpected error name '_mysql' is not defined
See original GitHub issueA clear and concise description of what the bug is.
i install superset on MacOS 10.15.5 when i want to add the DB source of mysql, i click the button of [Test Connection],they out the error message
ERROR: Unexpected error occurred, please check your logs for details
then i see the console out the error info
Unexpected error name '_mysql' is not defined
ERROR:superset.views.core:Unexpected error name '_mysql' is not defined
INFO:werkzeug:127.0.0.1 - - [22/Jul/2020 23:10:09] "POST /superset/testconn HTTP/1.1" 400 -
Expected results
i don’t know what to do, please tell me what to do.
Actual results
Screenshots
How to reproduce the bug
- when i running the cmd of start superset and visit the web http://localhost:8088/,
- use the menu – > Sources --> Databases, input something then Click on ‘Test Connection’
- Scroll down to ‘…’
- See error
Unexpected error name '_mysql' is not defined
ERROR:superset.views.core:Unexpected error name '_mysql' is not defined
INFO:werkzeug:127.0.0.1 - - [22/Jul/2020 23:10:09] "POST /superset/testconn HTTP/1.1" 400 -
Environment
(please complete the following information):
- superset version:
superset 0.36.0
- python version:
Python 3.7.7
- node.js version:
node v12.10.0
- npm version:
npm v6.11.3
- mysql version:
mysql 8.0.19
- mysqlclient version:
mysqlclient 2.0.1
- mysql-connector-python version:
mysql-connector-python 8.0.21
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven’t found one similar.
Additional context
Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
name '_mysql' is not defined after setting change to mysql ...
So this NameError: name '_mysql' is not defined is the problem. I installed mysqlclient before, changed settings.py , made db in mysql, ...
Read more >superset Database on mysql Unexpected error name '_mysql ...
[GitHub] [incubator-superset] liuyuchuan opened a new issue #10396: superset Database on mysql Unexpected error name '_mysql' is not defined.
Read more >Issue Code Reference - Apache Superset
The database returned an unexpected error. ... Your query failed because of an error that occurred on the database. This may be due...
Read more >nameerror: name _mysql is not defined ( Best Solution )
nameerror : name _mysql is not defined error occurs while connecting python end application with MySQL DB due to incompatibility or client/ connector ......
Read more >I am not able to create a table inside my database... - 237893
In "Superset" view, from "Sources" tab, I clicked on "Tables". I then clicked on the "+" sign beside "Add Filter", I chose my...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
OMG! The problem is solved after i installed the pymysql driver like this:
pip install pymysql
then i use the SQLAlchemy URI like this:mysql+pymysql://root:Root1234@127.0.0.1:3306/superset
and i use the uri like this is work too.
mysql+mysqlconnector://root:Root1234@127.0.0.1:3306/superset
i want to know why i can’t use the SQLAlchemy URI like this:
it also works for me.