0
votes

I've recently set up a Ubuntu 9.10 server with a LAMP configuration and then installed Coldfusion 9 Development version as well.

I've got phpMyAdmin working, so MySql and PHP are fine, and I can serve coldfusion pages, but if I cannot verify my Coldfusion datasource. I get the following error:

Could not create connection to database server. Attempted reconnect 3 times. Giving up.

With the top of the stack trace showing

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

These are my settings for the datasource in the Coldfusion administrator

JDBC URL jdbc:mysql://192.168.1.19:3306/dbname

Drive class com.mysql.jdbc.Driver

Driver name ConnectorJ 5.1.7

And I know the username and password are correct as they're the same ones I use for phpMyAdmin. Does anyone have any ideas why it's not working?

3

3 Answers

1
votes

I'm using almost the same configuration on few boxes and have no such problems, so it looks like you are misconfiguring the datasource.

Are you trying to create the dsn with "MySQL (4/5)" driver? I'm not sure how to read your settings string properly. Is that IP is your localhost? If yes, why not try to use the localhost for server name.

1
votes

It's a permissions problem. The IP needed to be 192.168.1.19 in the DSN setup in the administrator, but that didn't fix it alone.

I also created a 'temp' MySQL user based on a post found here: http://www.linuxquestions.org/questions/showthread.php?p=4039359#post4039359

And used that instead, it worked.

0
votes

Try using 127.0.0.1 as the MySQL server address in your DSN configuration