<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
{mso-style-priority:99;
mso-style-link:"Plain Text Char";
margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
span.PlainTextChar
{mso-style-name:"Plain Text Char";
mso-style-priority:99;
mso-style-link:"Plain Text";
font-family:"Calibri","sans-serif";}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";}
@page WordSection1
{size:8.5in 11.0in;
margin:70.85pt 129.75pt 56.7pt 129.7pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoPlainText><span lang=DE>Tipp von einem Nutzer, der nicht an der Entwicklung des Volkszählers beteiligt ist... den vz@localhost Nutzer umbenennen in vz@%, also ein Wildcard im Hostnamen. Dann gibt es dieses Problem nicht mehr, das verschiedene Ursachen haben könnte (Konfiguration der DB, Konfiguration der Middleware, Probleme mit der Namensauflösung).<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE><o:p> </o:p></span></p><p class=MsoPlainText><span lang=DE>Bei mir:<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE><o:p> </o:p></span></p><p class=MsoPlainText>MariaDB [(none)]> select user,host from mysql.user;<o:p></o:p></p><p class=MsoPlainText><span style='font-family:"Courier New"'>+----------+-----------+<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>| user | host |<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>+----------+-----------+<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>| vz | % |<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>| vz-admin | % |<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>| root | localhost |<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>+----------+-----------+<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoPlainText>MariaDB [(none)]> select user,host from mysql.db;<o:p></o:p></p><p class=MsoPlainText><span style='font-family:"Courier New"'>+----------+-----------+<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>| user | host |<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>+----------+-----------+<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>| vz | % |<o:p></o:p></span></p><p class=MsoPlainText><span style='font-family:"Courier New"'>| vz-admin | % |<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE style='font-family:"Courier New"'>+----------+-----------+<o:p></o:p></span></p><p class=MsoPlainText><span lang=DE><o:p> </o:p></span></p><p class=MsoPlainText>> -----Original Message-----</p><p class=MsoPlainText>> From: volkszaehler-users [mailto:volkszaehler-users-</p><p class=MsoPlainText>> bounces@demo.volkszaehler.org] On Behalf Of G. Stenzel</p><p class=MsoPlainText>> Sent: Friday, April 10, 2020 10:12 PM</p><p class=MsoPlainText>> To: volkszaehler.org - users</p><p class=MsoPlainText>> Subject: [vz-users] Kein INSERT Zugriff für user vz@127.0.0.1 auf Datenbank</p><p class=MsoPlainText>> volkszaehler</p><p class=MsoPlainText>> </p><p class=MsoPlainText>> Hallo</p><p class=MsoPlainText>> </p><p class=MsoPlainText>> Mit meinem neuen Volkszähler gibt es noch ein Problem. Der vzclient</p><p class=MsoPlainText>> kann keine Daten in die Datenbank schreiben:</p><p class=MsoPlainText>> </p><p class=MsoPlainText>> access.log:</p><p class=MsoPlainText>> </p><p class=MsoPlainText>> ::1 - - [10/Apr/2020:21:20:07 +0200] "GET /middleware.php/data/65e46840-</p><p class=MsoPlainText>> dd17-11e2-8103-</p><p class=MsoPlainText>> 553845eeddfc.json?operation=add&ts=1586546401000&value=16609469.8</p><p class=MsoPlainText>> HTTP/1.1" 400 352 "-" "vzclient/1.0"</p><p class=MsoPlainText>> </p><p class=MsoPlainText>> Wenn ich den Befehl in der Kommandozeile eingebe, kommt folgende</p><p class=MsoPlainText>> Meldung:</p><p class=MsoPlainText>> </p><p class=MsoPlainText>> /var/www/volkszaehler.org/bin/vzclient -u 65e468</p><p class=MsoPlainText>> 40-dd17-11e2-8103-553845eeddfc add data ts=1586546401000</p><p class=MsoPlainText>> value=16609469.8</p><p class=MsoPlainText>> {"version":"0.3","exception":{"message":"An exception occurred while</p><p class=MsoPlainText>> executing 'INSERT INTO data (channel_id, timestamp, value) VALUES</p><p class=MsoPlainText>> (6,?,?)' with params</p><p class=MsoPlainText>> [1586546401000,\"16609469.8\"]:\n\nSQLSTATE[42000]: Syntax error or</p><p class=MsoPlainText>> access violation: 1142 INSERT command denied to user 'vz'@'127.0.0.1'</p><p class=MsoPlainText>> for table 'data'","type":"ConnectionException","code":0}}</p><p class=MsoPlainText>> </p><p class=MsoPlainText>> Ein Check der Zugriffsrechte in mysql ergibt:</p><p class=MsoPlainText>> </p><p class=MsoPlainText>> MariaDB [volkszaehler]> SHOW GRANTS FOR 'vz'@'localhost';</p><p class=MsoPlainText>> +--------------------------------------------------------------------------------------------</p><p class=MsoPlainText>> ---------------+</p><p class=MsoPlainText>> | Grants for vz@localhost |</p><p class=MsoPlainText>> +--------------------------------------------------------------------------------------------</p><p class=MsoPlainText>> ---------------+</p><p class=MsoPlainText>> | GRANT USAGE ON *.* TO 'vz'@'localhost' IDENTIFIED BY PASSWORD</p><p class=MsoPlainText>> '*C142FB215B6E05B7C134B1A653AD4B455157FD79' |</p><p class=MsoPlainText>> | GRANT SELECT, INSERT, UPDATE, DELETE ON `volkszaehler`.* TO</p><p class=MsoPlainText>> 'vz'@'localhost' |</p><p class=MsoPlainText>> | GRANT DELETE ON `volkszaehler`.`aggregate` TO 'vz'@'localhost'</p><p class=MsoPlainText>> |</p><p class=MsoPlainText>> | GRANT DELETE ON `volkszaehler`.`properties` TO 'vz'@'localhost'</p><p class=MsoPlainText>> |</p><p class=MsoPlainText>> | GRANT DELETE ON `volkszaehler`.`entities_in_aggregator` TO</p><p class=MsoPlainText>> 'vz'@'localhost' |</p><p class=MsoPlainText>> +--------------------------------------------------------------------------------------------</p><p class=MsoPlainText>> ---------------+</p><p class=MsoPlainText>> 5 rows in set (0.002 sec)</p><p class=MsoPlainText>> </p><p class=MsoPlainText>> Kann es sein daß für die Datenbank die User vz@127.0.0.1 und</p><p class=MsoPlainText>> vz@localhost nicht dasselbe sind? Komischerweise ging das bei früheren</p><p class=MsoPlainText>> Tests schon mal. Ich weiß nicht, was ich hier verbogen habe. Könnte</p><p class=MsoPlainText>> mir bitte mal jemand auf die Sprünge helfen?</p><p class=MsoPlainText>> </p><p class=MsoPlainText>> Ein "get data" auf der Konsole geht übrigens.</p><p class=MsoPlainText>> </p><p class=MsoPlainText>> Danke und Gruß</p><p class=MsoPlainText>> G.</p><p class=MsoPlainText><o:p> </o:p></p></div></body></html>