March 23, 2020
MySql Connection
March 23, 2020
MySql Connection
Newbie 1 posts
Followers: 0 people

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.  Nothing happens.  I get a navigation to the webpage was cancelled.

I then try the same thing with SQL Server and this time it is

  • Connection verification failed for data source: NM
    java.sql.SQLInvalidAuthorizationSpecException: [Macromedia][SQLServer JDBC Driver][SQLServer]Login failed for user ‘aadowns5’.
    The root cause was that: java.sql.SQLInvalidAuthorizationSpecException: [Macromedia][SQLServer JDBC Driver][SQLServer]Login failed for user ‘aadowns5’.

Any help with what I am doing wrong would be greatly appreciated.  If I can’t do this with MySql and Sql Server, can someone tell me how to create a database using Apache Derby Embedded?  I tried to check the box to create a database, but this did not work.

1 Comment
2020-03-31 17:03:56
2020-03-31 17:03:56

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: 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:// . 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:

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.

Add Comment