question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Change the setting of superset from sqlite to MySQL - a problem!

See original GitHub issue

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.

  1. 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 = ''

  1. I’m executing the code Fabmanager create-admin --app superset

In my database mysql, tables have been added, as well as 1 user admin.

default

  1. Then I execute the code: Superset db upgrade

At this point, the sqlite database is created! Why? default

default

  1. Then I execute the code: Superset init

And the changes are again happening in the database sqlite ! Why? default

Thank you.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
blllicommented, Mar 15, 2019

export SUPERSET_CONFIG_PATH=superset/superset_config.py work for me

1reaction
Aung-Myint-Theincommented, Aug 8, 2017

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 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change the setting of superset from sqlite to MySQL - a problem!
Hey. I want to change the standard database configuration from sqlite to mysql. ... In my database mysql, tables have been added, as...
Read more >
How to change the setting of apache superset from sqlite to ...
I have create superset_config.py to override the configuration after adding the property i am able to enabled swagger url I have added ...
Read more >
Superset database migration: from SQLite to MySQL
Migration procedure · Dump the data of superset.db to corresponding SQL statements. · Transform SQLite-compatible statements to MySQL-compatible statements. · Load ...
Read more >
How to Migrate from SQLite to MySQL: 2 Easy Methods - Learn
The quickest and easiest way to convert SQLite to MySQL is by exporting an SQL Database to a Dump File, and then importing...
Read more >
Frequently Asked Questions - Apache Superset
Superset is tested using Mysql, Postgresql and Sqlite for its backend. It's recommended you install Superset on one of these database server for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found