Internet of Things – OpenHAB1 – MySQL (persistence)
1) Installeer de OpenHAB MySQL persistence addon met apt-get: sudo apt-get install -y openhab-addon-persistence-mysql
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: openhab-addon-persistence-mysql 0 upgraded, 1 newly installed, 0 to remove and 127 not upgraded. Need to get 832 kB of archives. After this operation, 833 kB of additional disk space will be used. Get:1 http://dl.bintray.com/openhab/apt-repo stable/main armhf openhab-addon-persistence-mysql all 1.8.3 [832 kB] Fetched 832 kB in 0s (4,006 kB/s) Selecting previously unselected package openhab-addon-persistence-mysql. (Reading database ... 124416 files and directories currently installed.) Preparing to unpack .../openhab-addon-persistence-mysql_1.8.3_all.deb ... Unpacking openhab-addon-persistence-mysql (1.8.3) ... Setting up openhab-addon-persistence-mysql (1.8.3) ... |
2) Stel het MySQL wachtwoord in: sudo mysqladmin -u root password 3) Maak een database aan genaamd “openhab”: sudo echo "create database openhab" | mysql -u root -p Controleer of de database is aangemaakt met: sudo mysql MySQL commando: show databases;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 16 Server version: 10.1.23-MariaDB-9+deb9u1 Raspbian 9.0 Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | openhab | | performance_schema | +--------------------+ 4 rows in set (0.00 sec) |
4) Maak …
Internet of Things – OpenHAB1 – MySQL (persistence) Lees meer »