MySQL persistence error


I run openhab 2 on rpi3 on rasbian. Got openhab2 up and running, except MySQL persistence. On startup, I get following errors on the log:

10:04:45.412 [WARN ] [sql.internal.MysqlPersistenceService] - The SQL database URL is missing - please configure the sql:url parameter in openhab.cfg
10:04:45.523 [WARN ] [ence.jdbc.internal.JdbcConfiguration] - JDBC::updateConfig: try to load JDBC-driverClass: 'com.mysql.jdbc.Driver'
10:04:45.525 [WARN ] [persistence.jdbc.internal.JdbcMapper] - JDBC::openConnection: setupDataSource.

I was running openhab 1 successfully on this, and just to make it straightforward, I deleted all the tables from my MySQL database names “openhab”. Now, after restart I see two empty tables, names “Items” and “items” (Capital and Simple I)

Any help to get this resolved is much appreciate!


I have mysql.cfg at /openhab/conf/services with following content:

# the database url like 'jdbc:mysql://<host>:<port>/<database>' (without quotes)

# the database user

# the database password

# the reconnection counter

# the connection timeout (in seconds)

# Use MySQL Server time to store item values (=false) or use openHAB Server time (=true).
# For new installations, its recommend to set "localtime=true".
# (optional, defaults to false)

The strangest part is, I still get the same error when I rename the file to mysql.bak

Looks like openhab2 is not reading this file at all.