superset连接mysql_superset 安装配置

本文档介绍了如何在Python虚拟环境中安装配置Superset,并连接到MySQL数据库。首先,需要确保环境为Python3.6,然后按照官方步骤安装依赖、升级pip、安装Superset并初始化数据库。接着,解决配置MySQL连接时遇到的问题,如缺少mysqlclient依赖,安装mysql-devel解决报错。最后,成功配置Superset以连接到MySQL数据库。
摘要由CSDN通过智能技术生成

一、配置python虚拟环境,请参考

superset依赖python3.6环境

https://www.cnblogs.com/xibuhaohao/p/9994854.html

二、安装配置superset

参考superset官网

1.安装依赖包

For Fedora and RHEL-derivatives, the following command will ensure that the required dependencies are installed:

sudo yum upgrade python-setuptools

sudo yum install gcc gcc-c++ libffi-devel python-devel python-pip python-wheel openssl-devel libsasl2-devel openldap-devel

2.升级pip,用来符合python的版本

Put all the chances on your side by getting the very latest pip and setuptools libraries.:

pip install --upgrade setuptools pip

3.安装与配置superset

Follow these few simple steps to install Superset.:

# Install superset

pip install superset

# Create an admin user (you will be prompted to set a username, first and last name before setting a password)

fabmanager create-admin --app superset

# Initialize the database

superset db upgrade

# Load some data to play with

superset load_examples

# Create default roles and permissions

superset init

# To start a development web server on port 8088, use -p to bind to another port

superset runserver -d

三、登录superset连接数据库

3f643117d7aa51a780359b696fc039cf.png

1.配置MySQL连接

一开始配置的时候报出错误,没有MySQL数据库连接驱动,到python虚拟环境安装,一直报错

按照观方

629f9d543d4d260f67177d40ffd76948.png

5d1eaea1e6f41c99afb0b1ae276d599b.png

2.解决报错

通过搜索,找到一片文章,需要安装mysqlclient的依赖包 https://blog.csdn.net/xc_zhou/article/details/80871374

yum install mysql-devel

再次安装mysqlclinet则ok

070e3a6a2c3a4ebb4e2b9df21ced5771.png

3.配置superset连接数据库

mysql://dbadmin:dbadmin@127.0.0.1:3306/dbadmin

e1bb8f4e1280761e73ab22fd8161b424.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值