Hi,
seit OpenHAB Release 1.4 hat sich ja einiges getan im Bezug auf die MySQL Persistence. Leider auch soviel, dass ich sie nicht mehr zum Laufen bekomme:
Neu aufgesetztes Debian Wheezy mit OpenHAB 1.4 (Stable) und MySQL 5.5.35.
openhab.cfg:
Im logback.xml den Log-Level für "org.openhab.persistence" auf DEBUG gesetzt:
Versuch in der Shell mit lokalem MySQL zu connecten:
=> An den Berechtigungen kann es also nicht liegen.
Hat irgendjemand eine Idee, was ich noch versuchen kann?
LG,
Michael
seit OpenHAB Release 1.4 hat sich ja einiges getan im Bezug auf die MySQL Persistence. Leider auch soviel, dass ich sie nicht mehr zum Laufen bekomme:
Neu aufgesetztes Debian Wheezy mit OpenHAB 1.4 (Stable) und MySQL 5.5.35.
openhab.cfg:
Code:
#### SQL Persistence Service #### # the database url like 'jdbc:mysql://<host>:<port>/<user>' mysql:url=jdbc:mysql://localhost:3306/openhab mysql:user=openhab mysql:password=abc123
Code:
==> /var/log/openhab/events.log <== 2014-02-16 23:35:49 - MySwitchItem received command OFF ==> /var/log/openhab/openhab.log <== 23:35:49.591 DEBUG o.o.p.m.i.MysqlPersistenceService[:355]- mySQL: Attempting to connect to database jdbc:mysql://localhost:3306/openhab 23:35:49.595 ERROR o.o.p.m.i.MysqlPersistenceService[:383]- mySQL: Failed connecting to the SQL database using: driverClass=com.mysql.jdbc.Driver, url=jdbc:mysql://localhost:3306/openhab, user=openhab, password=abc123 [COLOR="Red"]com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure[/COLOR] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:532) at com.mysql.jdbc.Util.handleNewInstance(Util.java:411) at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1121) Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:385) at java.net.Socket.connect(Socket.java:546) 23:35:49.595 WARN o.o.p.m.i.MysqlPersistenceService[:268]- mySQL: No connection to database. Can not persist item 'MySwitchItem (Type=SwitchItem, State=OFF)'! Will retry connecting to database next time.
Code:
user@mainserver:/opt/openhab/configurations/persistence# mysql -u openhab -p openhab Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2377 Server version: 5.5.35-0+wheezy1 (Debian) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> [B]create table EXAMPLE( id INT); Query OK[/B], 0 rows affected (0.86 sec) mysql> drop table EXAMPLE; Query OK, 0 rows affected (0.06 sec) mysql>
Hat irgendjemand eine Idee, was ich noch versuchen kann?
LG,
Michael
Kommentar