MSQL Persistence - mySQL: Failed connecting to the SQL database

  • Platform information:
    • Hardware: Processor Intel® Core™2 Quad CPU Q9650 @ 3.00GHz, 3000 Mhz, 4 Core(s), 4 Logical Processor(s), 16GB RAM
    • OS: Windows 10
    • Java Runtime 8 151
    • openHAB version: 2.3.0
  • Issue of the topic: I’m able to connect to mySQL on //127.0.0.1:3306 using mySQL workbench but OpenHAB has this in the log:
    mySQL: Failed connecting to the SQL database using: driverClass=com.mysql.jdbc.Driver, url=jdbc:mysql://127.0.0.1:3306/openhab, user=openhab, password=********
  • Please post configurations (if applicable):
    • Items configuration related to the issue
    • Sitemap configuration related to the issue
    • Rules code related to the issue
    • Services configuration related to the issue
# the database url like 'jdbc:mysql://<host>:<port>/<database>' (without quotes)

url=jdbc:mysql://127.0.0.1:3306/openhab
#url=jdbc:mysql://127.0.0.1/OpenHAB

# the database user
user=openhab

# the database password
password=habopen

# the reconnection counter
#reconnectCnt=

# the connection timeout (in seconds)
#waitTimeout=

# 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


  • If logs where generated please post these here using code fences:
mySQL: Failed connecting to the SQL database using: driverClass=com.mysql.jdbc.Driver, url=jdbc:mysql://127.0.0.1:3306/openhab, user=openhab, password=********

Please try to use jdbc persistence instead.