You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Step 1: Create user# RHOST=remoteHost; RPORT=8086# AUTH="Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImFkbWluIiwiZXhwIjoyNTM0MDIxODU2MDB9.Fu66RZDcUSawPpmtCpVDMr8kWjbTgmBa4I1kFzCLxM8"# CONTENT_TYPE="tent-Type: application/x-www-form-urlencoded"# BODY=q="CREATE USER \"santa\" with PASSWORD '1qaz@WSX3edc' WITH ALL PRIVILEGES;"
curl -X POST -H $AUTH -H $CONTENT_TYPE -d $BODY http://$RHOST:$RPORT/query
curl -X POST -H $AUTH -H $CONTENT_TYPE -d $BODY https://$RHOST:$RPORT/query
# Step 2: Use the tools to browse# https://github.com/influxdata/chronograf
chronograf --influxdb-url="$URL" \
--influxdb-username="santa" \
--influxdb-password="1qaz@WSX3edc"# Others
BODY=q="DROP USER \"santa\";"
curl -X POST -H $AUTH -d $BODY$URL/query
Resources
Common commands
show databases # 显示所有数据库
show users # 显示所有用户
use db_name # 使用数据库
show measurements # 显示所有测量值createuser "santa" with password '1qaz@WSX3edc' with all privileges # 创建用户createdatabase "db_name" # 创建数据库dropdatabase"db_name"# 删除数据库dropuser santa # 删除用户select*from"measurement_name"limit10# 查询 measurement_name 表的前十条数据