2 Replies Latest reply on Aug 22, 2017 12:59 PM by JeffDumbell

    SQL Developer MySQL connection error

    JeffDumbell

      I've been trying to set up a connection to MySQL from SQL Developer for several days now, but can't get past the above error.  I've followed the instructions i.e. downloaded the latest .jar file from MySQL, saved on my laptop, and added and entry in the Third Party Drivers.  I have the MySQL tab in my connections, but when I try to connect to my MySQL database (which is on a virtual linux machine in virtualbox) I get the following error:

       

      Status : Failure -Communications link failure

       

       

      The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

       

      I can ping the ip address for my VM from my laptop so not quite sure what's going wrong.

       

      Has anybody else has this issue and resolved it successfully?  If so I'd be grateful for some advice.

       

      SQL Developer Version 4.1.5.21

      MySQL version 5.6.32

      MySQL JDBC Driver version 5.1.43

      Oracle Linux 7

       

      Regards,

       

      Jeff

        • 1. Re: SQL Developer MySQL connection error
          Roland Mueller

          The things I would check first to track the source of network communication failure

          • can you ping the VM's IP?
          • can you ping the VM by its host name, in case hostname is used in your MySQL configuration in Oracle
          • is the Tcp port visible ?
            • you can try this using telnet <IP/hostname> 3306
          • can you

          On the VM it may be that

          • MySQL is not listing to Tcp
          • MySQL is listsinging to Tcp, but only on localhost
          • access to port 3306 is blocked

           

          Inside the VM you can check with the following command whether you can access mysql by Tcp rather than by some socket

          • mysql --protocol=TCP -u root -p
          • 2. Re: SQL Developer MySQL connection error
            JeffDumbell

            Roland,

             

            thanks for your response.  I've tried just about everything you have suggested, and various permutations e.g. using sid, service name, ip address and host name.  I will try your suggestion from the guest back to the host and post how I get on.

             

            Regards,

             

            Jeff