iNET Interactive - Online Advertising Agency
          
   Home    Authors    About    Login    Contact Us
   Search:   
Advanced Search     
  Articles

  ASP (26)
  ASP.NET (19)
  C and C++ (4)
  CFML (2)
  CGI and Perl (16)
  Flash (2)
  Java (7)
  JavaScript (28)
  PHP (92)
  MySQL (13)
  MSSQL (3)
  HTML (34)
  SEO (9)
  Visual Basic (12)
  CSS (13)
  SSI (5)
  XML (12)
  C# (14)

  Developer News

May 8, 2008
Meet The Hardy Heron: What's New in Ubuntu 8.04
OReilly Network
 
May 8, 2008
Does Enterprise Development Have to Be Painful? (Part Two)
OReilly Network
 
May 8, 2008
Perl Pragma Primer
WebReference.com
 
May 8, 2008
1 comment
.net
 
May 7, 2008
Poll: Do you check the download speed of the pages you build?
About
 
May 6, 2008
Web Design Firms - 18 New Listings
About
 
Courtesy of moreover.com
 
Want to receive new articles via e-mail? Click here!
/Home /CFML

Connecting a Datasource to MySQL using ColdFusion MX 

  Views:    7109
  Votes:    2
by Ed Salsberg 5/04/06 Rating: 

Synopsis:

Macromedia calls it a bug. MySQL calls it an updated authentication. We don't care who's right or wrong we just want it to work!!! Here's the fix for your CFMX to MySQL datasource woes. Note: This fix was performed and tested on a developer workstation. Do not use it in production until you've tested it first!
Pages: 
The Article

Problem: Unable to create a datasource using MySQL driver included with CF. This failed on both  CFMX 6.1 and  CFMX 7 using MySQL 5

Solution: Due to a new authentication code in MySQL you will need to download a new set of MySQL Connector/J database drivers from MySQL.

So here's what I did to get it running on my workstation using the standard server for CFMX7

Uninstalled both CFMX & MySQL
Ran RegClean to clean the registry for any possible leftovers.

Fresh Install of CFMX - Configured Normally
Fresh Install of MySQL - Configured as Server for WebApps (MyISAM)

Stopped all the CF & MySQL services

Copied the mysql-connector-java-3.1.12-bin.jar from the zip file to...

For Standard CF Server: {CFusionMX path}runtime/servers/lib/mysql-connector-java-3.1.12-bin.jar (http://dev.mysql.com/downloads/connector/j/3.1.htmll)
For Standalone Self-Contained Server: {CFusionMX path}/wwwroot/WEB-INF/lib/mysql-connector-java-3.1.12-bin.jar
For J2EE Server: J2EE {J2EE path}/servers/lib/mysql-connector-java-3.1.12-bin.jar
   Note: mysql-connector-java-5.0.0-beta-bin.jar seems to work fine as well, but test it before you go to production (http://dev.mysql.com/downloads/connector/j/5.0.html)

Restarted the stopped services

Added a DSN using "Other"
      JDBC URL: jdbc:mysql://server:port/dbname
      Driver Class: com.mysql.jdbc.Driver
      Driver Name: MySQL 5.0
      Username: dbusername
      Password: dbpassword


Security Note: This was done on my workstation. In a production environment you should never have your db, application services on the same server. DB servers should always live behind a separate firewall.
Pages: 



 
  Sponsors