Windows版influxDB安装和配置
一、在官网https://portal.influxdata.com/download下载,选择Windows版本
二、解压到安装盘,目录为:
三、打开influxdb.conf文件,配置meta、data、wal的路径,配置完成后并保存文件
四、启动influxDB,打开cmd命令
为了使第三步的配置生效,启动influxd时需要制定配置
influxd --config influxdb.conf
- 如果出现下列情况,启动失败,还需要修改influxdb.conf
在influxdb.conf中修改如下一行,修改地址并且打开注释,修改后保存
再次运行 influxd --config influxdb.conf 命令
出现如下信息启动成功
五、启动influx,在启动一个cmd窗口,执行如下命令:
显示数据库:show databases
创建数据库: create database myfirstdb
使用数据库:use myfirstdb
创建表
直接在插入数据的时候指定表名(weather就是表名)
insert weather,altitude=1000,area=北 temperature=11,humidity=-4
显示该数据库中的表:show measurements
查询数据:select * from weather
删除表:drop measurements weather
删除数据库:drop database myfirstdb