Cold Fusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingCold Fusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 7th, 2004, 04:57 PM
GhstBer GhstBer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 5 GhstBer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Problems with MySQL connections

Hi!

I am working with MySQL 4.1.3, previously using 4.0.something, and developing Coldfusion MX 6.1 apps (running Windows XP Pro). When I was using the previous MySQL version, I could create a new datasource in Coldfusion to use just fine using the user/pass I set up with the MySQL server. Since I upgraded, I cannot log connect using the same user/pass, or root, however I can log in using admin, which at the current moment has no password. The error I get is:

[]java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
The root cause was that: java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?

I can connect thru the shell just fine using any user/pass. The port is open as well. I am running a firewall, however I have opened the ports necessary, and, as stated above, it was working just fine above. I also tried to update the JDBC connectors, however I am not sure that that was entirely successful (the upgrade instructions said place the .jar file into a specific directory, then didnt say anything else about it).

Any ideas?

Reply With Quote
  #2  
Old July 8th, 2004, 10:26 AM
Sabre Hosting Sabre Hosting is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 7 Sabre Hosting User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to Sabre Hosting Send a message via AIM to Sabre Hosting Send a message via MSN to Sabre Hosting
are you renting the server or have you purchased the server?

Reply With Quote
  #3  
Old July 8th, 2004, 08:12 PM
GhstBer GhstBer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 5 GhstBer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Sorry, I forgot to mention, I am using my home PC as a webserver/database server/coldfusion server/mailserver.

Reply With Quote
  #4  
Old July 9th, 2004, 07:15 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via ICQ to dhouston
Did you extract the .jar file? I'm not sure that's even necessary, but I figured I'd ask.
__________________
Please don't PM me asking for solutions outside the scope of a thread.
Keeping all responses in a thread stands to help others who come along later,
which is after all what this forum's all about.

Reply With Quote
  #5  
Old July 9th, 2004, 11:00 AM
GhstBer GhstBer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 5 GhstBer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I extracted the the mysql-connection-java-3.0.14-production-bin.jar file from the archive I downloaded from MySQL.com into C:\Program Files\Java\j2re1.4.2_04\lib\ext like the installation instructions said:

Setting the CLASSPATH (For Standalone Use)

Once you have un-archived the distribution archive, you can install the driver in one of two ways: Either copy the "com" and "org" subdirectories and all of their contents to anywhere you like, and put the directory holding the "com" and "org" subdirectories in your classpath, or put mysql-connector-java-[version]-bin.jar in your classpath, either by adding the FULL path to it to your CLASSPATH enviornment variable, or by copying the .jar file to $JAVA_HOME/jre/lib/ext. If you are going to use the driver with the JDBC DriverManager, you would use "com.mysql.jdbc.Driver" as the class that implements java.sql.Driver.


Please correct me if I am wrong in just doing this and if I must do more.


Thanks for all your help.

Reply With Quote
  #6  
Old July 9th, 2004, 12:40 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via ICQ to dhouston
What's your connection string in your code look like? Now that I reread your initial error message, it does look like the driver's maybe being found but that it just can't connect.

Reply With Quote
  #7  
Old July 9th, 2004, 02:37 PM
GhstBer GhstBer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 5 GhstBer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Coldfusion does not require a connection string in the code. It has a portion of it called the Coldfusion Administrator, in which I can create a connection to a datasource. It has the following fields:

  • Datasource Name
  • Database
  • Server
  • Username
  • Password
  • Port
  • Description
Advanced Section fields are:

  • Connection String
  • Limit Connections (Checkbox)
  • Restrict Connections To
  • Maintain Connections (Checkbox)
  • Timout
  • Interval
  • Disable Connections
  • Login Timeout
  • CLOB (Checkbox)
  • BLOB (Checkbox)
  • Long Text Buffer
  • Blob Buffer
  • Allowed SQL (Checkboxes):
  • SELECT
  • Create
  • GRANT
  • INSERT
  • DROP
  • REVOKE
  • UPDATE
  • ALTER
  • Stored Procedures
  • DELETE
The fields I have filled out are:

  • Datasource Name: DnDCalendar
  • Database: dndcalendar
  • Server: localhost
  • Port: 3306
  • Username: Admin
  • Password: -blank-
What do you think I should try?

Reply With Quote
  #8  
Old July 9th, 2004, 03:18 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via ICQ to dhouston
Hmmm, I don't know. What do you think about my moving this over to the Cold Fusion forum, where CFM developers might spot it and be able to help? Since you can connect from the shell, it doesn't look like it's a mysql issue.

Reply With Quote
  #9  
Old July 9th, 2004, 04:09 PM
GhstBer GhstBer is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 5 GhstBer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I don't see why not, I put it here mainly because the forum looked a little more trafficked than the Coldfusion one, but yeah, go ahead.

And thanks for all the help!

Reply With Quote
  #10  
Old July 12th, 2004, 10:58 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 16
Send a message via ICQ to dhouston
Moved. Here's hoping some CFM developers can jump in with some tips.

Reply With Quote
  #11  
Old August 3rd, 2004, 03:02 PM
faith faith is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 1 faith User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hy. I'm having the same problem as GhstBer with MySQL 4.1.3 and ColdFusion MX 6.1 on Windows XP:

[]java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
The root cause was that: java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?

Have you find an answer to that problem? Please let me know if so. Thanks.

Reply With Quote
  #12  
Old August 16th, 2004, 01:16 PM
xenden xenden is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 xenden User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally Posted by faith
Hy. I'm having the same problem as GhstBer with MySQL 4.1.3 and ColdFusion MX 6.1 on Windows XP:

[]java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?
The root cause was that: java.sql.SQLException: Communication failure during handshake. Is there a server running on localhost:3306?

Have you find an answer to that problem? Please let me know if so. Thanks.

Read the docs on mysql 4.1. Says something about storing passwords differently, I believe. Might be the 'root' cause.

Reply With Quote
  #13  
Old August 16th, 2004, 02:12 PM
xenden xenden is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 xenden User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile

Quote:
Originally Posted by xenden
Read the docs on mysql 4.1. Says something about storing passwords differently, I believe. Might be the 'root' cause.

Yup. That's it. You can use the mysql command OLD_PASSWORD to set a password to the 'old', less secure style (that CF works with by default).

I have yet to try doing the bit with the .jar's, but remember that CF by default uses it's own JRE (less you configured it differently) so you might be sure you got the jar in the right place.

Reply With Quote
  #14  
Old January 30th, 2005, 04:16 AM
Muzak Muzak is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 1 Muzak User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 m 55 sec
Reputation Power: 0
There's an article on the Macromedia website on how to add an MySQL datasource.

http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=6ef0253

Just tried it and works fine here.
All you need is the .jar file from the mysql-connector download.

regards,
Muzak

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingCold Fusion Development > Problems with MySQL connections


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap