Database Connection from PHPStorm to Vagrant Box stopped working
Hi
I have been using PHPStorm to link to various Vagrant instances for over a year now with no issues. I am running PHPStorm on a Mac
However suddenly it all stopped working the other day, i use different vagrant instances so it can't be a problem at the instance level.
If i use Navicat lite to connect with 100% the same settings then it works fine , it is just from within PHPStorm that i seem to be having the problems .
The error i get is as follows : "MySQL - xxxxx@localhost
Connection refused to host: localhost; nested exception is:
java.net.ConnectException: Connection refused"
Any help or pointers would be appreciated.
Thanks
Please sign in to leave a comment.
Hi,
Please check your hosts file - does it have any wrong/unexisting IP addresses?
It is also worth checking through guide https://confluence.jetbrains.com/display/PhpStorm/Databases+and+SQL+Editor+in+PhpStorm once again.
looked at hosts file no wrong ip's
I have looked at the link and i am doing the same , could it be a version of JAVA changed on my machine not sure if it has
Maybe it's MySQL driver used by IDE -- what version do you have there?
See below, i tried latest and all the other ones listed (some id downloaded from the net) none of them make any difference
Please try 5.1.35 -- the 5.1.40 & 41 seem to have some issues
Check this StackOwerflow question/answer for details on how to: http://stackoverflow.com/questions/43604963/phpstorm-mysql-connector-j-stopped-working-after-update-to-5-1-40
I have tried all this and it still doesn't work , all dbase connections to external servers (so not on vagrant) are broken too , very odd
In such case -- no other ideas from my end -- it works fine for me on Windows 10 connecting local and remote MySQL servers (direct connections though, no SSH or anything like that).
Try collecting more logs (How-to: Collecting PhpStorm/WebStorm debug Logs ) and submit your idea.log (Help | Show Log in) using "Submit a Request" link on the top of this page.
Please submit a request and send us IDE logs so we would be able to troubleshoot this.