[SOLVED] Mysql setup

I am trying to setup mysql, I have a URL specified in my mysql.cg file, but when openHAB starts, it says “[WARN ] [ysql.internal.MysqlPersistenceService] - The mySQL database URL is missing. Please configure the url parameter in the configuration.”
Here are the contents of my mysql.cfg file

# 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)

Any ideas on what is going on?
Thanks in advance.

Likely either the mysql.cfg file is in the wrong place, or OH is reading a cached copy.

Verify your config file is in the right place, then try clearing your cache.


mysql.cfg is in the services folder. How do I clear the cache?

A tiny little search should have found this:

1 Like

I had searched as many terms as I could think of before starting this thread, and just didn’t think to search. Thank you for your help!
Edit: I had to create a new user, and then clear the cache and restart OH, then it has started to work. Thank you!

1 Like