Database Setup: Cannot connect to localhost

Hi,

I’m trying to get through the Database Settings on the initial setup but I receive the following error when I try to go to the next page. Below are the settings I’m entering in:

Database Driver Presets: MySQL

JDBC Driver Class: com.mysql.jdbc.Driver

Database URL: jdbc:mysql://localhost:3306/Openfire

Error:

STACKTRACE:

java.net.ConnectException: Connection refused

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.PlainSocketImpl.doConnect(Unknown Source)

at java.net.PlainSocketImpl.connectToAddress(Unknown Source)

at java.net.PlainSocketImpl.connect(Unknown Source)

at java.net.SocksSocketImpl.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.connect(Unknown Source)

at java.net.Socket.<init>(Unknown Source)

at java.net.Socket.<init>(Unknown Source)

at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)

at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)

at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)

at com.mysql.jdbc.Connection.<init>(Connection.java:1555)

at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConn ectionBuilder.java:39)

at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159)

at org.logicalcobwebs.proxool.Prototyper.sweep(Prototyper.java:102)

at org.logicalcobwebs.proxool.PrototyperThread.run(PrototyperThread.java:44)

  • END NESTED EXCEPTION **

It says connection refused. Did you create a database in MySQL called openfire? Did you create a user for that database and grant it proper privileges in MySQL?

Thanks for your reply. Yes, we did create a database called “Openfire” and the user does have proper privlieges.

What OS is openfire/Mysql running on? I assume, due to localhost they are on the same server. MySQL is allowing connections on localhost?

Both are native to eachother and the OS is Fedora Core 6.

Hi dev20,

I am not sure about MySQL, but I know with Postgres you have to make sure it is listening on a localhost network port and not a special “socket” file. This involves starting Postgres with the -i flag, maybe MySQL needs something similiar.

daryl

How about firewalls in fedora. Did you allow the ports to pass for MySQL? It has been a while since I used that old version of fedora.

Hi,

I had the

same Problem.

My Database

was set up to accept only socket connections.

Control your

MySQL Config at etc/mysql/my.cnf if you

have the folwing settings:

bind-address = 127.0.0.1

  • skip-networking

In my case

networking was disabled.

Christian