文章目录操作生成token创建数据库插入数据查询数据如何界面化查看呢?安装并启动服务1、打开influxdb官网下载界面地址https://www.influxdata.com/downloads2、下载的文件找个位置解压双击influxdb3.exe启动服务3.0版本有什么变化报错报错 Write command failed: ensure that a single protocol line string is provided as the final argument, enclosed in quotes文档这里用的是windows版本influxdb3。操作这一步是基于安装并已启动服务安装见下文。生成token3.0版本之后需要token了。生成token命令.\influxdb3.exe create token--admin--hosthttp://localhost:8181返回结果New token created successfully!Token: 这里是token值 HTTP Requests Header: Authorization: Bearer 这里是token值 IMPORTANT: Store this token securely, as it will not be shown again.保存好token值后续用的到。创建数据库.\influxdb3.exe create database test_db--token这里替换成你刚才复制的令牌--hosthttp://localhost:8181插入数据.\influxdb3.exewrite--databasetest_db--token这里是token值--precisionscpu,hostserver01 usage45.2 1715000001.\influxdb3.exewrite--databasetest_db--token这里是token值--precisionscpu,hostserver01 usage50.5 1715000002.\influxdb3.exewrite--databasetest_db--token这里是token值--precisionscpu,hostserver02 usage12.0 1715000003查询数据.\influxdb3.exe query--database test_db--token这里是token值SELECT * FROM cpu WHERE hostserver01如何界面化查看呢?建议用grafana见另外一篇笔记。安装并启动服务1、打开influxdb官网下载界面地址https://www.influxdata.com/downloads到达这个界面继续点继续点2、下载的文件找个位置解压双击influxdb3.exe启动服务这样这个服务就启动了窗口不要关闭。3.0版本有什么变化1、端口不是8086了而是81812、需要token了3、移除了ui界面报错报错 Write command failed: ensure that a single protocol line string is provided as the final argument, enclosed in quotes插入数据时报的这个错。解决方案单引号改为双引号问题解决。文档influxdb官网下载界面https://www.influxdata.com/downloads