[vz-users] SQL Datenbank auf meinem Synology NAS benutzen

News news at spider-wolf.de
Sun Feb 14 16:24:18 CET 2016


Hi,

danke für deinen Tipp mit mysqldump. hat einwandfrei funktioniert und ist auch kein Problem

mysqldump -u root -p volkszaehler > sicherung.sql
Backup auf dem RPI erstellen
mysql -u root -p volkszaehler < sicherung.sql 
auf der Synology zurückspielen

DANKE

Daniel



> Am 14.02.2016 um 11:39 schrieb Christian Schnellrieder <schnellrieder.cs at gmail.com>:
> 
> Hallo:
> 
> >Wie bekomme ich es hin damit er die Tabellen selbst anlegt oder muss >ich das alles händigt erledigen?
> 
> Ich hab die Datenbank auch umgesiedelt und hab einfach per mysqldump die gesamte Datenbank übertragen.
> 
> 
> Grüße
> 
> Marius Tarlowski <marius at tarlowski.de <mailto:marius at tarlowski.de>> schrieb am So., 14. Feb. 2016 um 11:31 Uhr:
> Na gar nicht. Der vz logger kann keine Tabellen erstellen. 
> Wozu auch?
> 
> Du findest das Layout im Wiki unter Installation der middleware. Unter manuelle Installation
> 
> Mfg, Marius Tarlowski
> (über mein Android geschrieben)
> 
> Am 14.02.2016 11:10 schrieb "News" <news at spider-wolf.de <mailto:news at spider-wolf.de>>:
> Hallo,
> 
> ich habe meinem Volkszähler am laufen und wollte nun die Datenbank auf meiner Synology benutzten. 
> 
> Hierzu habe ich folgende dinge gemacht:
> - MariaDB und myphpadmin auf der Synology installiert
> - auf myphpadmin eingeloggt und eine Datenbank „Volkszähler“ erstellt und dort einen Benutzer erstellt der auf diese Datenbank volle Zugriffsrechte hat 
> - in der Datei /var/www/volkszaehler.org/etc/volkszaehler.php.conf <http://volkszaehler.org/etc/volkszaehler.php.conf> folgende Sachen geändert
> 
> Benutzer und Passwort natürlich geändert (:
>  * PDO driver for Doctrine DBAL
>  *
>  * See Doctrine doc for details: http://www.doctrine-project.org/projects/dbal/2.0/docs/reference/configuration/en#getting-a-connection:driver <http://www.doctrine-project.org/projects/dbal/2.0/docs/reference/configuration/en#getting-a-connection:driver>
>  */
> $config['db']['driver']                         = 'pdo_mysql';
> 
> /**
>  * Hostname of database server
>  *
>  * Use 'localhost' for the machine your webserver is running on.
>  * See Doctrine doc for details: http://www.doctrine-project.org/projects/dbal/2.0/docs/reference/configuration/en <http://www.doctrine-project.org/projects/dbal/2.0/docs/reference/configuration/en>
>  */
> $config['db']['host']                           = '192.168.0.100';
> 
> /**
>  * Username for the database server
>  *
>  * See Doctrine doc for details: http://www.doctrine-project.org/projects/dbal/2.0/docs/reference/configuration/en <http://www.doctrine-project.org/projects/dbal/2.0/docs/reference/configuration/en>
>  */
> $config['db']['user'] = ‚USER';
> **
>  * Password for the database server
>  *
>  * See Doctrine doc for details: http://www.doctrine-project.org/projects/dbal/2.0/docs/reference/configuration/en <http://www.doctrine-project.org/projects/dbal/2.0/docs/reference/configuration/en>
>  */
> $config['db']['password'] = ‚PASSWORD';
> 
> /**
>  * @var string database name
>  *
>  * See Doctrine doc for details: http://www.doctrine-project.org/projects/dbal/2.0/docs/reference/configuration/en <http://www.doctrine-project.org/projects/dbal/2.0/docs/reference/configuration/en>
>  */
> $config['db']['dbname'] = 'Volkszaehler';
> 
> /**
>  * @var database connection encoding - should not be changed
>  *
>  * See http://stackoverflow.com/questions/13399912/symfony2-charset-for-queries-parameters <http://stackoverflow.com/questions/13399912/symfony2-charset-for-queries-parameters>
>  */
> $config['db']['charset']                        = 'UTF8';
> 
> 
> in der vzlogger.log bekomme ich folgende Meldung
> [[Feb 14 10:59:26][s0]   Reading S0 - returning 2 readings (n=1 n_neg = 0)
> [Feb 14 10:59:26][mtr0] Got 2 new readings from meter:
> [Feb 14 10:59:26][mtr0] Reading: id=Power/StringItentifier: value=262.62 ts=1455443966918
> [Feb 14 10:59:26][mtr0] Reading: id=Impulse/StringItentifier: value=1.00 ts=1455443966918
> [Feb 14 10:59:26][chn0] Adding reading to queue (value=1.00 ts=1455443966918)
> [Feb 14 10:59:26][SUM]  1.000000 @ 1455443966918
> [Feb 14 10:59:26][SUM]  RESULT 1.000000 @ 1455443966918
> [Feb 14 10:59:26][chn0] ==> number of tuples: 1
> [Feb 14 10:59:26][chn0] compare: 1455443953210 1455443966918
> [Feb 14 10:59:26][chn0] JSON request body: [ [ 1455443966918, 1 ] ]
> [Feb 14 10:59:26][chn0] CURL: Hostname was found in DNS cache
> [Feb 14 10:59:26][chn0] CURL:   Trying 127.0.0.1...
> [Feb 14 10:59:26][chn0] CURL: Connected to 127.0.0.1 (127.0.0.1) port 80 (#39)
> [Feb 14 10:59:26][chn0] Buffer dump (size=0): {}
> [Feb 14 10:59:26][chn0] CURL: Sent 24 bytes.. 
> [Feb 14 10:59:26][chn0] CURL: Sent '[ [ 1455443966918, 1 ] ]' bytes
> [Feb 14 10:59:26][chn0] CURL: upload completely sent off: 24 out of 24 bytes
> [Feb 14 10:59:27][chn0] CURL: HTTP 1.0, assume close after body
> [Feb 14 10:59:27][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:27][chn0] CURL: Received 598 bytes
> [Feb 14 10:59:27][chn0] CURL: Received '{"version":"0.3","exception":{"message":"An exception occurred while executing 
> 'SELECT e0_.id AS id0, e0_.uuid AS uuid1, e0_.type AS type2, p1_.id AS id3, p1_.pkey AS pkey4, p1_.value AS value5, 
> e0_.class AS class6, p1_.entity_id AS entity_id7 FROM entities e0_ LEFT JOIN properties p1_ ON e0_.id = p1_.entity_id 
> WHERE (e0_.uuid = ?) AND e0_.class IN ('channel', 'aggregator') ORDER BY p1_.pkey ASC' with params 
> [\"bb9dd5f0-d267-11e5-8d0c-5bb1b6a29b44\"]:\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 
> 'Volkszaehler.entities' doesn't exist","type":"TableNotFoundException","code":0}}' bytes
> [Feb 14 10:59:27][chn0] CURL: Closing connection 39
> [Feb 14 10:59:27][chn0] CURL Request succeeded with code: 200
> [Feb 14 10:59:27][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:27][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:28][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:28][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:28][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:29][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:29][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:29][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:30][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:30][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:30][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:31][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:31][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:31][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:32][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:32][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> [Feb 14 10:59:32][S0]   MeterS0:HWIF_GPIO:first poll returned 0
> 
> 
> Wie bekomme ich es hin damit er die Tabellen selbst anlegt oder muss ich das alles händigt erledigen?
> 
> 
> Danke
> 
> Daniel
> 
> 
> 
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://demo.volkszaehler.org/pipermail/volkszaehler-users/attachments/20160214/ae024d31/attachment-0001.html>


More information about the volkszaehler-users mailing list