尝试将 Coldfusion 9 连接到通过 MAMP(免费)安装的 MYSQL 数据源会引发错误
我正在尝试使用以下参数将 Coldfusion 9 连接到由 MAMP(免费而非 Pro)安装的 MYSQL 数据库:
CF 数据源名称: MyDatasource
数据库: MyDatabase
服务器: localhost
端口: 8889
用户名: root
密码: root
在 Coldfusion 管理员中我可以成功连接到该数据库。但是,当我尝试显示与该数据源有连接的 .cfm 页面时,会抛出此错误:
Error Executing Database Query.
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
有什么想法吗?
任何帮助将不胜感激!
编辑
这就是 MAMP 希望我使用的内容,它确实在 CF Admin 中创建了成功的连接。
I am trying to connect Coldfusion 9 to a MYSQL Database that was installed by MAMP (free not Pro) with the following parameters:
CF Data Source Name: MyDatasource
Database: MyDatabase
Server: localhost
Port: 8889
Username: root
Password: root
In the coldfusion Administrator I can successfully connect to this database. However, when I try to display a .cfm page that has a connection to that datasource, this error is thrown:
Error Executing Database Query.
Could not create connection to database server. Attempted reconnect 3 times. Giving up.
Any ideas??
Any help would be immensely appreciated!!
edit
this is what MAMP wants me to use and it did create a successful connection in CF Admin.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在CF管理中,如果点击“验证”就显示连接成功?通常 MySQL 数据库位于端口 3306 而不是 8889。您确定设置正确吗?
In the CF admin, if you click "Verify" it shows a successful connection? Usually MySQL databases are on port 3306 not 8889. Are you sure you have the correct settings?
因此,在搜索并试图弄清楚发生了什么之后,我决定检查我的 Application.cfm 文件,果然,我有所有查询的全局连接字符串。其中一个字符串是数据库密码,未设置为“root”。感谢您的帮助,对于这个愚蠢的问题,我深表歉意。
So, after searching and trying to figure out what is going on, I decided to check my Application.cfm file, and sure enough, I have global connection strings for all of my queries. One of those strings was the DB password, which was not set to "root".. Thank you for your help and I apologize for the stupid question..