I am trying to install 3.6.0a on centos 5 using mysql database. at the setup stage on Database Settings it says “A connection to the database could not be made. View the error message by opening the “/logs/error.log” log file, then go back to fix the problem.” check log files don’t make sense but it says connectionn refused.
I have java 6 and mysql 5 installed.
I change the [hostname] to actual server hostname and [database] to openfire’s database. Added “?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8” at the end of Database URL for mysql DB.
please help. tried everything. went through forum. got our system admin to try. stumped.
Make sure that you are using MySQL 4.1.18 or later (5.x recommended) ¹.
Create a database for the Openfire tables: mysqladmin create [databaseName]
(note: “databaseName” can be something like ‘openfire’)
Import the schema file from the **resources/database** directory of the installation folder:
Unix/Linux: cat openfire_mysql.sql | mysql [databaseName];
Windows: type openfire_mysql.sql | mysql [databaseName];
See step 3. The database stuff comes with the installation. You’ll need to navigate on your local file system to find the file, ‘openfire_mysql.sql’.
I change the [hostname] to actual server hostname and [database] to openfire’s database. Added “?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8” at the end of Database URL for mysql DB.
Why do you add this at the end of the Database URL? I would advise against doing that. The JDBC connect string needs to be of the simple form.
DB Connection URL: jdbc:mysql://[hostname]:3306/[database]
the command line for ODF worked. We are trying everything. I think we are going to start a new installation. How do you uninstall openfire? Start from stratch. We’ve installed openfire before through elastix. it was 3.5.1 version and it was very easy to setup.
No. it did not work. double check actual server name. they did this “enabled networking for the mysql service, it think this was the issue”. none of it worked.
I can not know what the database problem is based on this information. What would help is to read (and post here) what is in the log files during restart of OPF (e.g. /etc/init.d/openfire restart). Specifically from /opt/openfire/logs/error.log. Info.log and debug.log may also have useful data. Clearly you could uninstall, and reinstall. But if that does not resolve the issues, what will you do then? It seems you have a complicated enviornment, e.g. plesk and elastix which may intefere with proper OPF functioning, thus it may be useful to look into those log files as well to see if there is anything useful to know.
Command line tools like “netstat -l”, will tell you if mysql service is running on the host. Modifying /etc/init.d/openfire shell script and adding ‘-x’ to the shebang may help you trace the issue as well. There are many debugging techniques you could use, including modifying the java startup command. But you’ve got to be willing to explore these areas as well in order to succeed.