|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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? |
|
#2
|
|||
|
|||
|
are you renting the server or have you purchased the server?
|
|
#3
|
|||
|
|||
|
Sorry, I forgot to mention, I am using my home PC as a webserver/database server/coldfusion server/mailserver.
|
|
#4
|
||||
|
||||
|
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. |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
||||
|
||||
|
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.
|
|
#7
|
|||
|
|||
|
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:
The fields I have filled out are:
|
|
#8
|
||||
|
||||
|
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.
|
|
#9
|
|||
|
|||
|
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! |
|
#10
|
||||
|
||||
|
Moved. Here's hoping some CFM developers can jump in with some tips.
|
|
#11
|
|||
|
|||
|
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. |
|
#12
|
|||
|
|||
|
Quote:
Read the docs on mysql 4.1. Says something about storing passwords differently, I believe. Might be the 'root' cause. |
|
#13
|
|||
|
|||
|
Quote:
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. |
|
#14
|
|||
|
|||
|
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 |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Cold Fusion Development > Problems with MySQL connections |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|