尝试将 Coldfusion 9 连接到通过 MAMP(免费)安装的 MYSQL 数据源会引发错误

发布于 2024-11-10 07:54:02 字数 726 浏览 1 评论 0原文

我正在尝试使用以下参数将 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.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

内心荒芜 2024-11-17 07:54:02

在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?

笑忘罢 2024-11-17 07:54:02

因此,在搜索并试图弄清楚发生了什么之后,我决定检查我的 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..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文