EasyCFM.COM ColdFusion Forums / MySQL Related Issues / Unable to communicate with MySQL

   Reply to Discussion | New Discussion << previous || next >> 
Posted By Discussion Topic: Unable to communicate with MySQL

book mark this topic Printer-friendly Version  send this discussion to a friend  new posts last

GUXO
03-12-2009 @ 3:02 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 3
Joined: Mar 2009

I use Coldfusion 8 as a testing server running on Vista and Mysql 5, until last Monday everything was ok but from one day to next Coldfusion is unable to communicate with my databases.
when i verify the connection from Coldfusion administrator i receive this message:

Connection verification failed for data source: mydatabase
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused: connect STACKTRACE: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at java.net.Socket.(Socket.java:366) at java.net.Socket.(Socket.java:209) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:173) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:267) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2739) at com.mysql.jdbc.Connection.(Connection.java:1553) at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266) at coldfusion.server.j2ee.sql.pool.JDBCPool.createPhysicalConnection(JDBCPool.java:589) at coldfusion.server.j2ee.sql.pool.ConnectionRunner$RunnableConnection.run(ConnectionRunner.java:67) at java.lang.Thread.run(Thread.java:619) ** END NESTED EXCEPTION ** Last packet sent to the server was 0 ms ago.
The root cause was that: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.ConnectException MESSAGE: Connection refused: connect STACKTRACE: java.net.ConnectException: Connection refused: connect at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:519) at java.net.Socket.connect(Socket.java:469) at java.net.Socket.(Socket.java:366) at java.net.Socket.(Socket.java:209) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:173) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:267) at com.mysql.jdbc.Connection.createNewIO(Connection.java:2739) at com.mysql.jdbc.Connection.(Connection.java:...

I have already reinstall Mysql, Coldfusion and Java but the problem remains.

The problem is only with Mysql databases, Access works ok.

There is no problem openning my databases from Navicat or Mysql Administrator.

I have search for an answer for 4 days!
Please help!  

GUXO
03-13-2009 @ 8:08 PM
Reply
Edit
Profile
Send P.M.
My Gravatar!
Powered by Gravatar
New Member
Posts: 3
Joined: Mar 2009

PROBLEM SOLVED!!!!
YEAHHHHHH!!!!
It is amazing, today i woke up at 3:00 am thinking of this problem and then in a moment i remembered that some days ago a pop up window appeared on my system, it was Windows "Defender" saying it will start checking my system for malware or something like that, after the scan it said 1 treat have been found SettingsModifier:Win32/PossibleHostsFileHijack with a level alert of medium, of course i choosed the  clean file option.
Today i was looking at the log of "defender", the scan was the day Coldfusion stops comunicating with MySQL, I Clicked the obtain more information online link http://www.microsoft.com/security/portal/Entry.aspx?name=SettingsModifier%3aWin32%2fPossibleHostsFileHijack&threatid=1758608427027806866
and after reading the information i checked my hosts file, It was not as it should be!! the last parragraph was:
::1 localhost
and it should have been:
127.0.0.1 localhost
so i correct it on the notepad, entered coldfusion admin, verified the connections to my databases, and voila!! their status appeared as OK !!!!!!
I'm so happy, and of course i don`t understand what this funky "defender" is for, my system was ok before it ran that day, and then on their link they showed me how to fix what originally was ok, they said "Users affected by this incorrect detection may recover affected systems by adding the line: “127.0.0.1 localhost” to the HOSTS file"
Of course I didn`t expect that something that claims to have cleaned my system of some kind of trojan in fact have damaged some important system file.
Thank you Microsoft! i have lost 5 days trying to fix the problem.

I hope my experience can help someone.

Regards



Website Designed and Developed by Pablo Varando.