Cov txheej txheem:

Txuas Raspberry Pi IOT Database Nrog MS Excel - Teeb: 3 Kauj Ruam
Txuas Raspberry Pi IOT Database Nrog MS Excel - Teeb: 3 Kauj Ruam

Video: Txuas Raspberry Pi IOT Database Nrog MS Excel - Teeb: 3 Kauj Ruam

Video: Txuas Raspberry Pi IOT Database Nrog MS Excel - Teeb: 3 Kauj Ruam
Video: Eben Upton Interview: Raspberry Pi Availability & More! 2024, Kaum ib hlis
Anonim
Txuas Raspberry Pi IOT Database Nrog MS Excel - Teeb
Txuas Raspberry Pi IOT Database Nrog MS Excel - Teeb
Txuas Raspberry Pi IOT Database Nrog MS Excel - Teeb
Txuas Raspberry Pi IOT Database Nrog MS Excel - Teeb

Hauv ntiaj teb ntawm IOT cov ntaub ntawv khaws tseg, ib tus tsim ntau cov ntaub ntawv uas tau hloov pauv tsis tu ncua hauv cov ntaub ntawv khaws cia xws li Mysql lossis Oracle. Txhawm rau nkag mus rau, thiab tswj cov ntaub ntawv no, ib qho ntawm txoj hauv kev muaj txiaj ntsig tshaj plaws yog siv Microsoft Office cov khoom lag luam. Lub hom phiaj ntawm cov lus qhia no yog los qhia yuav ua li cas txuas Raspberry Pi tuav mysql database nrog MS Excel ntawm lub khoos phis tawj Windows.

BOM

1. Raspberry Pi (RPi) - uas yog siv Wi -nkaus, muaj Linux O/S teeb tsa thiab txuas nrog Is Taws Nem (Kuv siv RPi xoom hauv hom server). Kuv tab tom kwv yees tias koj paub yuav teeb tsa lub operating system ntawm Raspberry Pi li cas. Txheeb xyuas qhov txuas no kom pom cov duab tshiab (s) https://www.raspberrypi.org/downloads/. Noobs lossis Raspbian yog ob qho Linux cov duab uas yuav ua haujlwm.

Nov yog qhov version ntawm RPi Operating system kuv siv. Kuv tau txais qhov no los ntawm kev ua cov lus txib no hauv Putty. lsb_release -a Tsis muaj LSB cov qauv muaj. Distributor ID: Raspbian Nqe lus piav qhia: Raspbian GNU/Linux 8.0 (jessie) Tso tawm: 8.0 Codename: jessie

2. Windows laptop nrog MS Excel teeb tsa (tseem yuav ua haujlwm ntawm Apple cov cuab yeej thiab Linux desktops)

3. Putty - Nov yog lub davhlau ya nyob twg emulator uas tso cai rau koj nkag mus rau RPi Linux ib puag ncig los ntawm koj lub Windows Desktop.

Kauj Ruam 1: Teeb Koj Raspberry Pi

Teeb Koj Raspberry Pi
Teeb Koj Raspberry Pi
Teeb Koj Raspberry Pi
Teeb Koj Raspberry Pi

Nkag mus rau koj li RPi siv Putty thiab tom qab ntawd ua cov hauv qab no:

1. Teeb tsa Apache - (Tsis nruj me ntsis tsim nyog tab sis koj yuav xav siv lub vev xaib tom qab)

Ntaus cov lus txib hauv qab no -

sudo apt-tau hloov tshiabudo apt-tau nruab apache2

sudo a2dismod mpm_event

sudo a2enmod mpm_prefork

sudo systemctl rov pib dua apache2 (qhov no rov pib dua apache).

2. Teeb MySql

hom-sudo apt-tau nruab mysql-server

(Nkag mus rau tus lej zais ruaj ntseg thaum teeb tsa los ntawm kev teeb tsa). (Khiav mysql_secure_installation kom tshem tawm cov ntawv xeem database thiab ib qho kev siv tsis raug cai ntxiv rau thaum lub sijhawm pib txheej txheem txheej txheem:

hom - sudo mysql_secure_installation

(Nws tau pom zoo tias koj xaiv yog (y) rau txhua lo lus nug. Yog tias koj twb muaj tus lej nkag hauv paus ruaj ntseg, koj tsis tas yuav hloov nws.)

3. Nruab cov qauv piv txwv - Peb yuav siv Sakila rau qhov no - saib

Ntawm kab lus RpI, ntaus cov hauv qab no

cd /twm

sudo wget

sudo tar -xvzf sakila -db.tar.gz

YUAV TSUM YUAV TSHUAJ

sakila-db/ cov

sakila-db/sakila-data.sql

sakila-db/sakila-schema.sql

sakila-db/sakila.mwb

tam sim no ntaus ntawv, cd sakila-db

sudo chmod 755 *. *

Tam sim no LOG rau ntawm MYSQL SHELL IN PUTTY

mysql -u hauv paus -p (koj yuav tau txais kev ceeb toom rau tus password koj teeb tsa thaum lub teeb tsa mysql.

tam sim no ntaus ntawv, mysql> SOURCE /tmp/sakila-db/sakila-schema.sql;mysql> SOURCE /tmp/sakila-db/sakila-data.sql;

mysql> YUAV siv sakila; Database hloov pauv mysql> Qhia TABLES; (Koj yuav tsum pom)

+ ----------------------------+ | Tables_in_sakila | + ----------------------------+ | tus ua yeeb yam | | actor_info | | chaw nyob | | qeb | | nroog | | lub teb chaws | | neeg | | neeg_list | | zaj duab xis | | film_actor | | movie_category | | movie_list | | cov khoom siv | | lus | | nicer_but_slower_film_list | | them nyiaj | | xauj | | muag_by_film_category | | muag_by_store | | cov neeg ua haujlwm | | neeg ua hauj lwm_list | | khoom | + ----------------------------+ 22 kab hauv txheej (0.01 sec)

Koj tuaj yeem txheeb xyuas tau tias cov ntxhuav muaj cov ntaub ntawv los ntawm kev hais kom xaiv * los ntawm kev them nyiaj;

NYEEM NTAWV YOG MYSQL USER hom

mysql> CREATE USER 'sakila_test'@'%' IDENTIFIED BY 'your_password'; Lus nug OK, 0 kab cuam tshuam (0.01 sec)

mysql> YOOJ YIM YOOJ YIM YOOJ YIM RAU *. * TO 'sakila_test'@'%' NROG QHOV ZOO TSHAJ PLAWS;

Lus nug OK, 0 kab cuam tshuam (0.00 sec)

Ntaus tawm kom tawm Mysql plhaub kom rov qab mus rau lub plhaub Putty

Tom ntej no, ntaus sudo nano /etc/mysql/my.cnf

thiab tawm kab kom pom #khi-address = 127.0.0.1

Tam sim no tawm ntawm Putty plhaub.

Kauj ruam 2: Nruab ODBC ntawm WIndows

Nruab ODBC ntawm WIndows
Nruab ODBC ntawm WIndows
Nruab ODBC ntawm WIndows
Nruab ODBC ntawm WIndows
Nruab ODBC ntawm WIndows
Nruab ODBC ntawm WIndows
Nruab ODBC ntawm WIndows
Nruab ODBC ntawm WIndows

Mus -

Rub tawm cov ntawv cuam tshuam raws li cov duab saum toj no.

Tom ntej teeb tsa nws ntawm Windows. Ntawm Windows 10 - nyem qhov icon icon - hauv qab sab laug - tom qab ntawd nyem rau cog (lub cim thib ob los hauv qab) thiab ntaus odbc rau hauv lub thawv tshawb nrhiav thiab xaiv odbc cov ntaub ntawv cov ntaub ntawv (32 ntsis) tom qab ntawv ua raws li cov lus qhia hauv daim duab ODBC SET UP 1 - Tom ntej no ua raws cov theem qhia hauv daim duab ODBC SET UP 2 - siv cov kev teeb tsa uas koj tau siv yav dhau los, suav nrog koj RPi hostname + koj li Mysql ntawv pov thawj

Kauj ruam 3: Siv Excel

Siv Excel
Siv Excel
Siv Excel
Siv Excel

Ua raws cov kauj ruam hauv daim duab Excel 1 - Qhib daim ntawv ua haujlwm hauv Excel thiab tom qab ntawd xaiv Cov Ntawv Qhia zaub mov, tom qab ntawd Tau Cov Ntaub Ntawv, Lwm qhov chaw, ODBC - thiab xaiv koj cov ntaub ntawv qhov chaw. Tom ntej no, nkag mus rau Mysql tus neeg siv lub npe thiab tus password thiab tom qab ntawd txuas rau koj cov ntaub ntawv qhov chaw, piv txwv li sakila los ntawm qhov nco cia thiab nyem ok.. Yog tias koj nyem qhov xub ntawm cov npe cov ntaub ntawv ces cov ntxhuav hauv sakila database yuav tshwm. Thaum koj xaiv lub rooj thiab nyem rau ntawm pob khawm, lub rooj yuav tshwm hauv MS Excel.

Ntawd yog, hmoov zoo.

Pom zoo: