1. Statement
The current content is mainly to record starting InfluxDB and basic operations under Linux
2. Download and unzip
download
wget https://dl.influxdata.com/influxdb/releases/influxdb-1.8.4_linux_amd64.tar.gz
Unzip
tar xvf influxdb-1.8.4_linux_amd64.tar.gz
3. Start and test
cd influxdb-1.8.4-1/
cd usr/bin/
Start the service:./influxd
8086 is the connection port
Close: press Ctrl+C
4. Client connection and other operations
1. View the connection help:./influx -help
2. Client connection
./influx
3. Create a database: create database mytest
4. View the database: show databases
5. Use the database: use mytest
6. Insert data:
insert treasures,captain_id=dread_pirate_roberts value=801 1439856000
insert treasures,captain_id=flint value=29 1439856000
insert treasures,captain_id=sparrow value=38 1439856000
insert treasures,captain_id=tetra value=47 1439856000
insert treasures,captain_id=crunch value=109 1439858880
The last part of this shows the time rubbing, the default is not to write the current time, this is useful in testing
Here, the timing will be automatically created by default:treasures
==7. Query data: select * from treasures ==
8. Conditional delete operation:delete from treasures where captain_id='crunch'
delete from treasures where captain_id='crunch'
8. Delete the database:drop database mytest
9. Exit the command line: exit
5. Summary
1. The current command-line operation mode of InfluxDB is basically the same as that of sql. Basically this is no problem with SQL