portal entry

select a category, or use search below
(searches all categories and all time range)

MySql Connection

| View in Portal
March 23, 2020 02:20:20 AM GMT
1 Comment
<p>I cannot get my ColdFusion Builder 2018 to connect to a MySQL database.  For that matter, I cannot get it to connect to a SQL database.   I can go under ColdFusion Administrator, login, and then select data sources.  I choose my datasource name, choose MySql(DataDirect), fill in the information with Database – sakila (the example one that comes with MySQL Community edition), server is localhost (i have even tried, port is 3306, username is root and the my password.  […]</p>
<p>The post <a rel="nofollow" href="https://coldfusion.adobe.com/2020/03/mysql-connection/">MySql Connection</a> appeared first on <a rel="nofollow" href="https://coldfusion.adobe.com">ColdFusion</a>.</p>
Labels: ColdFusion Builder, Discussion, 2018, discussion


You mention the problem as being in ColdFusion Builder, but then you refer to the CF Admin. Can you confirm if the CF Admin is talking to the CF that you optionally chose to embed within CF when you installed CFBuilder? Or might the CF Admin be pointing to some OTHER CF, whether on your server or on some other server? This is important for your question, because it matters where the CF is relative to the DB server. But let's assume you ARE using the CF installed optionally within CFBuilder (or a CF you installed locally, separately). In either case, whether that CF can reach the MySQL or SQL Server depends on whether those two DB servers are configured a] to allow TCP/IP communications into them (yes, even if locally) and b] to use the ports you are specifying in the CF Admin, and c] to allow the user you are naming in the CF Admin to access the DB you are pointing to. Can you confirm all these things and report back? As for MySQL, note that there is also the additional need for you to embed a mysql driver into CF, because Adobe could not do that for us, due to licensing issues. There are many resouces online that talk about this. As for SQL Server, note that I have a post that discusses how to configure it so that CF can talk to it: <a href="https://www.carehart.org/blog/client/index.cfm/2006/7/8/sql2k5_Error_establishing_socket" rel="nofollow">https://www.carehart.org/blog/client/index.cfm/2006/7/8/sql2k5_Error_establishing_socket</a>. While the post is from 2006, I have kept it updated (the problem is that old, and clearly not a "cf problem".) Finally, as for Derby, well, it's one thing to name a Derby DB and point to it in the CF Admin, but there is nothing in the CF Admin to help you create the tables, their columns, their indexes. You would need a 3rd party tool for that. I will say first that I point to a list of such tools here: https://<a href="http://www.cf411.com/query" rel="nofollow">www.cf411.com/query</a> . While I don't indicate there any that are specifically for Derby, note that I point to some that work with any JDBC driver, and Derby is indeed accessed via JDBC. Finally, I have a resource on getting started with using Derby with CF. It's also from over a decade ago, but nearly all the info still applies (and though I indicate I updated it in 2017, I can't recall the update and suspect it was quite minor). Still, it may be helpful if you get motivated to pursue that route: <a href="https://www.carehart.org/resourcelists/derby_for_CFers/#query" rel="nofollow">https://www.carehart.org/resourcelists/derby_for_CFers/#query</a> Still, hope you get your problems resolved otherwise to use mysql or sql server, if you may prefer those. Let us know how it goes.
Comment by Charlie Arehart
4712 | March 31, 2020 05:03:56 PM GMT