Reputation: 14928
After PhpStorm suggested to update MySQL driver, my existing and working connections to MySQL databases had stopped working. I saw this problem reproduced on my Ubuntu and on another Mac. The error I received was:
[08S01] Communications link failure.
I use SSH tunneling to access the databases. Also, I use the latest stable version of PhpStorm (2017.1.2). The driver versions that caused troubles were 5.1.40 and 5.1.41 which I installed manually while trying to fix the problem.
Is there a quick way to fix that? I really need to continue working.
Upvotes: 2
Views: 2228
Reputation: 4502
Dont forget to type your db (3306) and SSH ports (in my case it was 22)
Upvotes: 0
Reputation: 10361
There is also an ability to add a driver to the list of MySQL Connector.
In order to do that, follow the steps below:
./jdbc-drivers/
folder. You should see in its content something like this:
./MySQL Connector/J/
create a new folder with the version number, in my case is 5.1.35
(as my previous driver file is ./mysql-connector-java-5.1.35-bin.jar
)
./mysql-connector-java-5.1.35-bin.jar
into the just created version folder (5.1.35
). So it'll look like this:
./jdbc-drivers.xml
.
<artifact>
block with the name MySQL Connector/J
with the newer version (in my case 5.1.40
), paste it below and change the version for this block to your new version (in my case 5.1.35
). It should look something like this:
You can repeat these steps for any other version you like.
Good luck!
Upvotes: 2
Reputation: 14928
It seems that the latest versions of MySQL Connector/J have some issues. The solution is to rollback to use the previous version of MySQL Connector/J driver in PhpStorm. In my case, the previous version was 5.1.35, which is working fine.
The problem is that the rollback is not that obvious. I didn't have the previous version in a driver selection popup:
The solution was to add an additional driver file that already existed on my PC:
Once I added the driver, the last step was to disable the "Use provided driver" checkbox:
Then I applied the changes, and the connections worked again.
Hope this helps.
Upvotes: 3