Skip to main content
January 15, 2009
Answered

Issues with CF 8

  • January 15, 2009
  • 11 replies
  • 2529 views
I am a web developer, I have no Idea how to setup a CF Server, I know the syntax of CF when developing but the server side of things has always been done for me, I have recently downloaded CF8 by can't get it to form a dns with MySQL, I keep getting this error "java.sql.SQLException" is there anyone who can help me solve this problem?
This topic has been closed for replies.
Correct answer
Thank you all for your help, using all the suggestions I have been able to connect and am working on my site now, thank you again

11 replies

BKBK
Community Expert
Community Expert
January 23, 2009
Greensquid wrote:
> Database: E:/ABC/ABC.mwb

No, Coldfusion wont look in any arbitrary folder. As I said above, it will only look in the directory {MySQL_HOME}\data\.

> Server:Localhost:8500
> Port:3306


No, you wrongly use 2 ports. Here you need just MySQL's port, not Coldfusion's. It usually is 3306. Therefore enter

Server: localhost
(or Server: 127.0.0.1)

and

Port: 3306





Correct answer
January 28, 2009
Thank you all for your help, using all the suggestions I have been able to connect and am working on my site now, thank you again
BKBK
Community Expert
Community Expert
January 23, 2009
Greensquid,

Let's cut the chase. MySQL installs by default a database called 'test'. Use it to test your settings.

For example, on my machine, MySQL databases are installed by default in the folder C:\Program Files\MySQL\MySQL Server 5.1\data\. Databases are represented as directories within the data folder.

I have verified that there is indeed a folder named 'test' in the data directory. The corresponding settings would therefore be

CF Data Source Name:ABC
Database: test
Server:127.0.0.1
Port:3306
Username: Root Login
Password:Root Password



Participating Frequently
January 20, 2009
http://dev.mysql.com/doc/refman/5.1/en/database-use.html

You can't have this line:
Database: E:/ABC/ABC.mwb

It should be something like:
Database: MyDB

Where MyDB corresponds to a database in MySQL (matches one of the names that you get from a SHOW DATABASES; command), NOT A FILE ON YOUR HARD DRIVE!!!!!

If you haven't actually created a database in MySQL, read this:
http://dev.mysql.com/doc/refman/5.1/en/creating-database.html
Participating Frequently
January 20, 2009
Did you follow a how-to or a walkthrough when you installed MySQL and set it up? If so, please post the link you used. That'll help.
Participating Frequently
January 20, 2009
"simply because the error pops up when I'm trying to set it up."

Very clearly and distinctly, explain exactly what you are doing when this error pops up. That's what I'm trying to get out of you. Are you in the Coldfusion Administrator? What page? What are you entering in each field?

Let me speak plainly. The more information you give us on how you're seeing this error, the easier it is for us to help you and not simply get frustrated and give up. Post back with as much detailed information as possible about how exactly you are getting the error. What are you doing when it comes up? What are you clicking on? What page are you on in your browser?
January 20, 2009
Yes I'm in the Admin. This is how I have it setup currently, so as to preserve my clients Anonymity the name of the DB has been changed, but that shouldn't matter.

Data Source Name: ABC
Driver: MySQL(4/5)

Press Add button. It takes you to the next page.

CF Data Source Name:ABC
Database: E:/ABC/ABC.mwb
Server:Localhost:8500
Port:3306
Username: Root Login
Password:Root Password

Once I leave the screen with the password and go back to the Datasource page, the error is there it is there if I have a login or password or not.
BKBK
Community Expert
Community Expert
January 19, 2009
Greensquid wrote:
> That didn't change anything, I guess I need Step-by-step
> instructions on how to set up a dns


Setting up MySQL in the Administrator is easy. I think it would save a lot of time if you let us know the steps you followed.

> I keep getting this error "java.sql.SQLException"
Very likely due to the wrong combination of username and password. You should use a valid MySQL username and password.


January 20, 2009
after installig MySQL and trying to set up a DSN and failing, I found a MySQL Workbench which allowed me yo save a Database as a .MWB file I have never liked using a command line input and not being able to figure out where things were being savedthis gave ma a GUI inveronment and the ability to save where I wanted, it also got rid of most of my error messages, I have not found anywhere to add a user name or password but I have been using the username and password I used when installing MySQL, That got rid of every error except the one I'm looking for help with.

This is how I have it setup currently, so as to preserve my clients Anonymity the name of the DB has been changed, but that shouldn't matter.

Data Source Name: ABC
Driver: MySQL(4/5)

Press Add button. It takes you to the next page.

CF Data Source Name:ABC
Database: E:/ABC/ABC.mwb
Server:Localhost:8500
Port:3306
Username: Root Login
Password:Root Password
Participating Frequently
January 20, 2009
> That got rid of every error except the one I'm looking for help with.

Which you still haven't given us enough information to help you with. When is this error occurring? What line of code? In the Coldfusion Administrator, can you verify the MySQL datasource you set up? Does that verification come back successful?
January 19, 2009
If you have a firewall, make sure to add exception to the MySQL port. Also, you can turn off your firewall then try to create a datasource. Make sure the service for MySQL is running and you can telnet.

Good Luck
Mamdoh
Participating Frequently
January 19, 2009
http://www.cfscreencast.com/screencast/episod2/index.html

This came up when googling for: "coldfusion setting up a mysql datasource"
Inspiring
January 19, 2009
So what is that last remaining error message and what are you trying to do when you encounter it?
Inspiring
January 17, 2009
> I am a web developer, I have no Idea how to setup a CF Server, I know the
> syntax of CF when developing but the server side of things has always been done
> for me, I have recently downloaded CF8 by can't get it to form a dns with
> MySQL, I keep getting this error "java.sql.SQLException" is there anyone who
> can help me solve this problem?

Have you done anything as obvious as googling the error message, or
googling how to set up a MySQL datasource (for the purposes of searching,
it's "DSN" not "DNS", btw).

I'm loath to help someone who doesn't seem to have invested much time in
trying to help themselves, before expecting people here to do it for them.

Have a hunt around the place for pre-existing docs (trust me, this has all
been covered and covered again already), and when and if you find some, do
what it says and then still have problems: come back to us.

If you show some evidence of having trying to sort it out yourself and are
still having problems, I'm happy to help. I'll keep an eye on this
thread...

--
Adam
January 19, 2009
I have been trying for the last month and a half to get this thing set up. I have tryed to find any and all Documentation that I could find, I started out with half a dozen error messages and have worked my way down to one and still have not found any way to get rid of it. I understand having people find it for themselfs and I can respect that stand, I however need to know how to do this and can't seem to figure out how to do so.