Make sure these boxes are checked before submitting your issue - thank you!
version: 0.17.1
Hey.
I want to change the standard database configuration from sqlite to mysql.
# 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 = ''
Fabmanager create-admin --app supersetIn my database mysql, tables have been added, as well as 1 user admin.

Superset db upgradeAt this point, the sqlite database is created! Why?


Superset initAnd the changes are again happening in the database sqlite ! Why?

Thank you.
export PYTHONPATH=$WHEREYOURCONFIGIS:$PYTHONPATH
should do the trick, where of course WHEREYOURCONFIGIS is the path of the superset_config with the mysql database.
I think there is something wrong with the latest (pip) version of superset.
I had it working with psql and after a recent deploy that installed the latest superset it stopped working.
I rolled back to version 0.15.4 and it works again.
Edit: My config file was in my PYTHONPATH
@jasondscott: you had superset installed on postgresql?
Anyway superset_config.py work fine here with latest master to override the db, fails badly with the options read by the cli though.
@xrmx Yes superset is installed on postgresql. Is that a problem?
To debug you can fire up ipython, run import superset_config and type superset_config? and it will print the location of your superset_config module. This needs to happen in the same context/environment as where you start the web server process from.
Whatever the problem was I think its been addressed. Closing
@jasondscott is this solved?
I am running superset 0.19.0 and installed it from pip with Python 3.4.5. However, I faced the same issue as this while I am using postgresql.
If it is solved, how did you solve it?
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 :)
after removing ~/.superset/superset.db, it works
so that it works for me, change the variable also in the config.py file (/usr/local/lib/pythonX.X/site-packages/config.py)
export SUPERSET_CONFIG_PATH=superset/superset_config.py
work for me
It seems that when i use Python 3.6.6 and try to add mysql instead of sqlite i get error : Was unable to import superset Error: No module named 'MySQLdb'. There is no MySQLdb for python 3+.Has Anyone faced this issue?
bump
export SUPERSET_CONFIG_PATH=superset/superset_config.py
worked for me thanks!
Most helpful comment
export SUPERSET_CONFIG_PATH=superset/superset_config.py
work for me