在Ubuntu 9.10上将Coldfusion 9与MySql 5连接 [英] Connecting Coldfusion 9 with MySql 5 on Ubuntu 9.10
问题描述
我最近用LAMP配置设置了Ubuntu 9.10服务器,然后还安装了Coldfusion 9 Development版本。
I've recently set up a Ubuntu 9.10 server with a LAMP configuration and then installed Coldfusion 9 Development version as well.
我已经使用phpMyAdmin,因此MySql和PHP很好,我可以提供Coldfusion页面,但是如果我不能验证我的Coldfusion数据源。我收到以下错误:
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:
无法创建与
数据库服务器的连接。尝试重新连接3次
次。放弃。
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
堆栈顶部显示
com。 mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:
无法创建与
数据库服务器的连接。尝试重新连接3次
次。放弃。
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
这些是我在Coldfusion管理员中数据源的设置
These are my settings for the datasource in the Coldfusion administrator
JDBC URL jdbc:mysql://192.168.1.19:3306 / dbname
JDBC URL jdbc:mysql://192.168.1.19:3306/dbname
驱动器类 com.mysql.jdbc.Driver
Drive class com.mysql.jdbc.Driver
驱动程序名称 ConnectorJ 5.1.7
Driver name ConnectorJ 5.1.7
我知道用户名和密码是正确的,因为它们与我用于phpMyAdmin的相同。有谁知道为什么它不起作用?
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?
推荐答案
这是权限问题。在管理员的DSN设置中,IP必须为192.168.1.19,但这并不能单独解决。
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.
我还根据以下位置创建了一个'temp'MySQL用户: http://www.linuxquestions.org/questions/showthread.php?p=4039359#post4039359
I also created a 'temp' MySQL user based on a post found here: http://www.linuxquestions.org/questions/showthread.php?p=4039359#post4039359
并使用它代替了它。
这篇关于在Ubuntu 9.10上将Coldfusion 9与MySql 5连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!