Ask a Question related to Coldfusion Database Access, Design and Development.
-
ked50 #1
How to connect to MySql from Cold Fusion
If I install Mysql either from their web site or by using WAMP. How do I
connect to a MySQL database from the Cold Fusion Administrator?
I am using a development editon using the "Server Edition" of Cold Fusion, and
I used the built in web server.
ked50 Guest
-
Migrating from Cold fusion 5 to Cold fusion 7
Hi, I am facing problem while migrating from CF 5 to CF 7. Please let me know is there any tool is available to Migrate from CF5 to CF 7. -
Cold Fusion / MySQL development setup NIGHTMARE!
Please, somebody, anybody.. I have tried many possible combinations of MySQL Server and the J connector. Nothing works. I have two DSN that I've... -
mySQL Drivers and Cold Fusion 6.1
Hello all, I have scoured the forums for some answers to the following problem: We are trying to install the latest mySQL drivers into Windows... -
Cannot connect SQL2000 Server Database to Cold Fusion
Hello I have a problem connecting my SQL2000 Server Database to my Macromedia ColdFusion MX in the ColdFusion MX Administrator section: Data &... -
Cannot Connect SQL 2000 Database to Cold Fusion
Hello I have a problem connecting my SQL2000 Server Database to my Macromedia ColdFusion MX in the ColdFusion MX Administrator section: Data &... -
am2605 #2
Re: How to connect to MySql from Cold Fusion
The way I did it was to download the ODBC driver for mysql from
[url]http://www.mysql.com/products/connector/odbc/[/url]
Then I created a datasource to my mysql database in Windows (Control Panel ->
Administrative Tools -> Data Sources ODBC)
Then in the ColdFusion Adminisrator under Data Sources add a new datasource
with the same name you gave the connection above, and select drive type as
"ODBC Socket".
There is also probably a way to do it using the MySQL JDBC driver but I have
found the above satisfactory for developing on my PC
am2605 Guest
-
rr008 #3
Re: How to connect to MySql from Cold Fusion
I spent a lot of time reading forums and articles (mostly at home) to make this
work, but CF now recognizes my MySQL database. Now the hard part to make the
program work with the MySQL data instead of MS Access.
I am using a PC with Windows XP, ColdFusion MX 6.1, MySQL 4.1 Server,
DreamWeaver MX installed.
Also works with a PC with Windows XP, ColdFusion MX 7.1, MySQL 4.1 Server, DW
8.
The MySQL Database is now recognized as a Data Source in CF MX 6.1 or CF MX 7x.
1. Downloaded the mysql-connector-java-3.0.17- version of MySQL Connector/J
from the MySQL download site.
Extracted the JDBC driver JAR file: mysql-connector-java-3.0.17-ga-bin.jar and
copied it to the C:\CFusionMX\wwwroot\WEB-INF\lib folder.
2. In the ColdFusion Administrator, clicked on the "Java and JVM" page.
Entered the full path to the JAR file in the Class Path field:
C:\CFusionMX\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar,
Note: It says to use a comma (,) to separate class paths when this field
contains multiple values. (Cold Fusion adds a comma at the end in CF MX 6.1.
3. Then I used the ColdFusion Administrator Data Sources page to add a new
data source for the MySQL Connector:
I named the data source MyDS and chose 'Other' for the Driver before pressing
the Add button. Then I set the following parameters:
JDBC URL: jdbc:mysql://localhost:3306/mydatabase
Driver Class: com.mysql.jdbc.Driver
Driver Name: MySQL Connector/J
Username: myuname
Password:
Note: I previously installed MYSQL 4.1 Server. I used MySQL Administrator to
set up a user named myuname with all access to the MySQL mydatabase located in
C:\Program Files\MySQL\MySQL Server 4.1\data folder and tested it by logging in
with MySQL Browser and executing a select command.
The Username and Password I put in above is for the MySQL username and
password that I created in MySQL Administrator.
I clicked Submit to apply the changes:
It now verifies the Data Source for MySQL database.
rr008 Guest



Reply With Quote

