When one sets up Openfire, the installer asks for database connection details with the default string including the confusing [localhost] and [database-name]
jdbc:jtds:sqlserver://[host-name]/[database-name];appName=Openfire
Even I have just replaced the "host-name" to leave the brackets in the string, which prompts Openfire to attempt to connect to "[host-name]" (literal with brackets)
Lets change to use HOST-NAME and DATABASE-NAME without the brackets