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 (35)
  SEO (9)
  Visual Basic (12)
  CSS (13)
  SSI (5)
  XML (12)
  C# (14)

  Developer News

July 3, 2009
Why Freelancing is Awesome
About
 
July 3, 2009
Twitter spurs Bing and Facebook real-time initiatives
WebDevTips UK
 
July 3, 2009
Maybe ?Paid? Is the Future of Online Business
WebDevTips UK
 
July 3, 2009
Will Microsoft, Google and Amazon talk you out of your datacentre?
WebDevTips UK
 
July 3, 2009
US Couple Gets Prison Time For Internet Obscenity
WebDevTips UK
 
July 3, 2009
Indenting Lists Consistently Across Different Browsers
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:    10238
  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