Article

Connecting to MySQL from Coldfusion 7

Coldfusion 7 only shipped with MySQL 3 drivers.  Here is how to add drivers for newer versions (5 at the time of this writing):

  1. Get yourself a copy of the newest MySQL Connector JDBC driver from http://dev.mysql.com/downloads/
  2. Locate the mysql-connector-java-*-bin.jar file and extract it into your cf_root/WEB-INF/lib folder on your CF server.
  3. Restart Coldfusion.

 

To add a new data source (DSN) using this new driver:

  1. Add new DSN using driver: other
  2. JDBC URL: jdbc:mysql://[host server name]:[port]/[database]
  3. Driver class: com.mysql.jdbc.Driver
  4. username/password if you want it defined in the administrator, else use them in your cfquery tags

 

 

Comments Closed.