From 724306e40952a9c7fb3c64cc00e98625aa408a3a Mon Sep 17 00:00:00 2001 From: Structix Date: Wed, 23 Aug 2017 09:06:41 +0000 Subject: [PATCH] Update README.md --- README.md | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 156e38c..309c9ad 100644 --- a/README.md +++ b/README.md @@ -3,20 +3,25 @@ ## mySQL -Login: mysql --user=root --password=password +Login: `mysql --user=root --password=password` -Creating new user: create user 'dhtuser'@'localhost' IDENTIFIED BY 'raspberry'; +Creating new user: `create user 'dhtuser'@'localhost' IDENTIFIED BY 'raspberry';` -Permissions: grant all privileges on *.* to 'dhtuser'@'localhost'; +Permissions: `grant all privileges on *.* to 'dhtuser'@'localhost';` -Create database: create database dhtstats; +Create database: `create database dhtstats;` -Use database: use dhtstats +Use database: `use dhtstats` -Create new table: CREATE TABLE stats (id MEDIUMINT NOT NULL AUTO_INCREMENT, pin int not null, humidity FLOAT NOT NULL, temperature FLOAT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) ); +Create new table: `CREATE TABLE stats (id MEDIUMINT NOT NULL AUTO_INCREMENT, pin int not null, humidity FLOAT NOT NULL, temperature FLOAT NOT NULL, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (id) );` -Show all entries in table: select * from stats +Show all entries in table: `select * from stats` ## Dependencies -sudo apt-get install libmysqlclient-dev libmysqld-dev mysql libconfig-dev +### Raspberry Pi +`sudo apt-get install libmysqlclient-dev libmysqld-dev mysql libconfig-dev` + +### ESP-8266 +[aRest](https://github.com/marcoschwartz/aREST) +