[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)
url=jdbc:mysql://127.0.0.1:3306/openhab
# the database user
user=openhab
# the database password
password=password1
# the reconnection counter
reconnectCnt=1
# the connection timeout (in seconds)
waitTimeout=28800
# 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)
localtime=true

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.

2 Likes

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