Connecting to MySQL 5 on CFMX 7

I keep forgetting how to do this and then where to find my notes, so I thought I would post it here…easy to find later.

1. Download MySQL Connector/J 3.1.12..

2. Extract this file and find a file named “mysql-connector-java-3.1.12-bin.jar”. Copy this file into “[cfmx_root]/runtime/lib” (this is for windows)

3. Restart the ColdFusion server.

4. Use the ColdFusion MX Administrator Data Sources page to add a new data source for the MySQL Connector:

5. Select Other in the driver field to tell ColdFusion you will describe another type of driver.

6. Click Add to add the data source and display the default driver window for this driver.

7. Enter the following in the JDBC URL field:

jdbc:mysql://localhost:3306/[your db]

8. Enter the class path: com.mysql.jdbc.Driver (this is case-sensitive.)

9. Enter a valid username and password in the Username and Password fields for the database.

10. Click submit to apply the changes to the data source.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*

*