Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / ColdFusion / Getting Started / November 2007



Tip: Looking for answers? Try searching our database.

Can't connect to a mysql database with CF 7.0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
drgak - 22 Nov 2007 11:23 GMT
I'm trying to connect to a mysql database using ColdFusion 7.0. I got a Java
error and found an answer in http://www.adobe.com/go/tn_19170. This told me to
download the following jar file from mysql: mysql-connector-java-3.1.10-bin.jar.

I did this and followed the instructions only to get the following error:

Connection verification failed for data source: JavaServer
[]java.sql.SQLException: No suitable driver available for JavaServer, please
check the driver setting in jrun-resources.xml, error: com.mysql.jdbc.Driver
The root cause was that: java.sql.SQLException: No suitable driver available
for JavaServer, please check the driver setting in jrun-resources.xml, error:
com.mysql.jdbc.Driver

I'm not sure where to go from here and am finding no help on the internet when
I google this error.

Any suggestions would be gratefully appreciated.

Thanks a milllion (and a happy Thanksgiving).

Sincerely,

Graham A. Kerby
Sankalan - 22 Nov 2007 12:24 GMT
The TechNotes
(http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_19170) steps should
work.

To interact with MySQL DB you need to create datasource. To create the
datasources please follow the steps mentioned below.

Download "mysql-connector-java-3.0.17-ga-bin.jar" and paste it inside
C:\CFusionMX7\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar
Hope your CF installation drive is "C".

Now go to CF administartor > Server Settings > Java and JVM.
In ColdFusion Class Path paste the jar file path
"C:\CFusionMX7\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar" and
hit "Submit Changes". Then restart CF.

Now create the MySql data source, give your data source name and select driver
as "Other" and provide the following parameters.

JDBC URL: jdbc:mysql://localhost:3306/yourDBName
Driver Class: com.mysql.jdbc.Driver
Driver Name: MySQL Connector J
User Name: YourMySQL User Name
Password: Your Password

Thanks
drgak - 26 Nov 2007 12:48 GMT
Thanks very much for your help.

I did everything you suggested and it worked. Then a few days later I went
back to Dreamweaver and tried to connect to a database only to find I've lost
the connection.

When I try to connect to a database I get the following error:

"Connection verification failed for data source: JavaServer
[]java.sql.SQLException: SQLException occurred in JDBCPool while attempting to
connect, please check your username, password, URL, and other connectivity info.
The root cause was that: java.sql.SQLException: SQLException occurred in
JDBCPool while attempting to connect, please check your username, password,
URL, and other connectivity info."

Any suggestions would be gratefully appreciated.

Thanks a million.

Sincerely,

Graham A. Kerby
Daverms - 26 Nov 2007 13:16 GMT
Hi,

That might have happened to you due to the DW site cache info. Try deleting your existing site definition and start defining it again afresh..

That will do..
drgak - 26 Nov 2007 18:41 GMT
Thanks for the advice. I've somehow got it working, but now I have a new
problem: I can set up the data sources in the ColdFusion Administrator, but I
can't connect to these sites in Dreamweaver where I've created the ColdFusion
pages that will use these databases.

I've just posted this problem in the ColdFusion Databases forum under the name
DRGAK.

Thanks again.
drgak - 27 Nov 2007 13:22 GMT
I've solved the DW problem by changing the site folders from 'db' to 'wwwroot'
e.g. 'C:\CFusionMX\db\' is now 'C:\CFusionMX\wwwroot\

However I'm now back to my original problem. I've lost my mqysql connection in
CF Adminstrator. Before I made these changes I could connect to my mysql
databases using the following settings:

JDBC URL: jdbc:mysql://localhost:3306/test
Driver Name: MySQL Connector J

using the following Java path and file:
C:\CFusionMX\wwwroot\WEB-INF\lib\mysql-connector-java-3.0.17-ga-bin.jar

Now these settings give me the following error:

"Connection verification failed for data source: javaserver
[]java.sql.SQLException: SQLException occurred in JDBCPool while attempting to
connect, please check your username, password, URL, and other connectivity info.
The root cause was that: java.sql.SQLException: SQLException occurred in
JDBCPool while attempting to connect, please check your username, password,
URL, and other connectivity info"

Any suggestions on this would also be welcome.

Thanks again to everyone for their help.

Sincerely,

Graham A. Kerby
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.