Put configuration in HUE as below:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/4D/8E/wKioL1RTNmDTWJ8JAAQPVVfyzSQ957.jpg "title=" Snap4.jpg "alt=" Wkiol1rtnmdtwj8jaaqpvvfyzsq957.jpg "/>
[Librdbms]
# The RDBMS app can has any number of databases configured in the databases
# section. A database is known by it section name
# (IE sqlite, MySQL, Psql, and Oracle in the list below).
[[Databases]]
# SQLite configuration.
# # [[SQLite]]
# Name to show in the UI.
# # Nice_name=sqlite
# for SQLite, name defines the path to the database.
#name =/tmp/sqlite.db
# Database backend to use.
#engine =sqlite
# Database options to send to the server when connecting.
# https://docs.djangoproject.com/en/1.4/ref/databases/
# # options={}
# MySQL, Oracle, or PostgreSQL configuration.
[[[MySQL]]
# Name to show in the UI.
Nice_name= "My SQL DB"
# for MySQL and PostgreSQL, name is the name of the database.
# for Oracle, Name is instance of the Oracle server. For Express Edition
# This was ' XE ' by default.
Name=dbname
# Database backend to use. This can is:
# 1. Mysql
# 2. PostgreSQL
# 3. Oracle
Engine=mysql
# IP or hostname of the database to connect to.
Host=mysql-server-ip
# Port The database server is listening to. Defaults is:
# 1. mysql:3306
# 2. postgresql:5432
# 3. Oracle Express edition:1521
# # port=3306
# Username to authenticate with when connecting to the database.
User=username
# Password matching the username to authenticate and when
# Connecting to the database.
Password=password
# Database options to send to the server when connecting.
# https://docs.djangoproject.com/en/1.4/ref/databases/
# # options={}
Restart HUE Service
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/4D/8F/wKiom1RTNlbj9xFmAAGpS_s5gS0278.jpg "title=" Snap6.jpg "alt=" Wkiom1rtnlbj9xfmaagps_s5gs0278.jpg "/>
Ok
This article is from the "ilovecat (personal note)" blog, so be sure to keep this source http://hj192837.blog.51cto.com/655995/1570390
Enable DB Query in HUE Web UI