Confirm that you successfully created the database and reconfigured mysql to listen on port 3306:
mysql --port=3306 -e "show databases;"
# (examine the output for your openfire database)
If the database is listed, test the credentials you used:
mysql --port=3306 -u openfireuser -p openfiredb -e "show tables;"
# replace "openfireuser" with the openfire user account you created
# replace "openfiredb" with the openfire database you created
# you will be prompted for the password
If those tests succeed, try replacing "localhost" with "127.0.0.1" in the jdbc connect string:
jdbc:mysql://localhost:3306/openfiredb
jdbc:mysql://127.0.0.1:3306/openfiredb
If the sql configuration tests failed, back up and find out why.