使用 MySQL 存储 Hue 元数据

本文介绍了如何在MySQL中创建数据库hue并配置hue.ini文件,包括设置数据库引擎、主机名、端口、用户名、密码等参数。此外还提供了初始化数据库的方法,通过执行huesyncdb和huemigrate命令完成。

1.在 MySQL 中增加数据库 hue

2.编辑 hue.ini 文件

[[database]]
  # Database engine is typically one of:
  # postgresql_psycopg2, mysql, sqlite3 or oracle.
  #
  # Note that for sqlite3, 'name', below is a path to the filename. For other backends, it is the database name
  # Note for Oracle, options={"threaded":true} must be set in order to avoid crashes.
  # Note for Oracle, you can use the Oracle Service Name by setting "host=" and "port=" and then "name=<host>:<port>/<service_name>".
  # Note for MariaDB use the 'mysql' engine.
  engine=mysql
  host=cen-ubuntu
  port=3306
  user=root
  password=ubuntu
  # conn_max_age option to make database connection persistent value in seconds
  # https://docs.djangoproject.com/en/1.9/ref/databases/#persistent-connections
  ## conn_max_age=0
  # Execute this script to produce the database password. This will be used when 'password' is not set.
  ## password_script=/path/script
  name=hue

3.初始化数据库

$ build/env/bin/hue syncdb
$ build/env/bin/hue migrate

转载于:https://www.cnblogs.com/cenzhongman/p/7262324.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值