superset: Change the setting of superset from sqlite to MySQL - a problem!
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 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
Superset version
version: 0.17.1
Hey. I want to change the standard database configuration from sqlite to mysql.
- Added its configuration file superset_config.py and put it in PYTHONPATH
# Superset specific config
#---------------------------------------------------------
ROW_LIMIT = 200000
SUPERSET_WORKERS = 4
SUPERSET_WEBSERVER_PORT = 8088
#---------------------------------------------------------
#---------------------------------------------------------
# Flask App Builder configuration
#---------------------------------------------------------
# Your App secret key
SECRET_KEY = '\2\1t567fgj7dtghjdhfui64@#$&77cvw424tkey\1\2\e\y\y\h'
# The SQLAlchemy connection string to your database backend
# This connection defines the path to the database that stores your
# superset metadata (slices, connections, tables, dashboards, ...).
# Note that the connection information to connect to the datasources
# you want to explore are managed directly in the web UI
#SQLALCHEMY_DATABASE_URI = 'sqlite:////path/to/superset.db'
SQLALCHEMY_DATABASE_URI = 'mysql://superset:32rasdf356ytsdfDD@localhost/superset'
# Flask-WTF flag for CSRF
CSRF_ENABLED = True
# Set this API key to enable Mapbox visualizations
MAPBOX_API_KEY = ''
- I’m executing the code
Fabmanager create-admin --app superset
In my database mysql, tables have been added, as well as 1 user admin.

- Then I execute the code:
Superset db upgrade
At this point, the sqlite database is created! Why?


- Then I execute the code:
Superset init
And the changes are again happening in the database sqlite ! Why?

Thank you.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (6 by maintainers)
export SUPERSET_CONFIG_PATH=superset/superset_config.py work for me
Oh solved the problem by
export PYTHONPATH="/home/user/superset/:$PYTHONPATH".Initially, I was using
export PYTHONPATH="/home/user/superset:$PYTHONPATH". … one simple/solved the problem 😃should do the trick, where of course WHEREYOURCONFIGIS is the path of the superset_config with the mysql database.