Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Tunneling Issue With Ssh And Localhost

forums forums SQLyog Using SQLyog Tunneling Issue With Ssh And Localhost

  • This topic is empty.
Viewing 11 reply threads
  • Author
    Posts
    • #9260
      zleviticus
      Member

      I am trying to set up a tunnel to a remote mysql server. i can connect to the server using ssh from a console application. I am trying to connect up to the local mysql server via the SSH tunnel.

      On the main server tab i am using

      localhost

      an admin username

      an admin password

      port 3306

      Db is blank

      on Tunnelling tab

      Username is SSH username

      Password is SSH password

      SSH host is my SSH domain host.

      the port are the default

      when i try to connect or test i get the following error.

      Error 1045:

      Access denied for user admin username @ domain name (using password yes)

      now shouldn't it use localhost after the @ instead of the domain name?

    • #19320
      peterlaursen
      Participant

      First we have a FAQ item:

      http://www.webyog.com/faq/22_44_en.html

      .. but it seems that you understood the basics.

      Second: read the help file. “getting started”. Actually it is pretty good on SSH.

      Third: the settings (1st and 2nd picture)below work fine here.

      Fourth

      Quote:
      SSH host is my SSH domain host.

      It is not quite clear to mean what you mean with “SSH domain host”. Do you operate a domain-based LAN ? Or how should I understand

      But actually I can enter the ip “10.0.0.2”, the windows network name “METUSALEM” or “localhost” (or the ip that it resolves to, ie. “127.0.0.1”) when connecteing through a SSH-server on the very same computer where both the server and the client runs.

      Fifth

      Quote:
      I am trying to set up a tunnel to a remote mysql server. i can connect to the server using ssh from a console application. I am trying to connect up to the local mysql server via the SSH tunnel

      Are you connecting to local server or remote server or want to do both ?

      third picture shows a setting that works from another computer using dyndns lookup. But here I also can use the ip or the windows network name.

    • #19321
      peterlaursen
      Participant

      One thing more:

      Quote:
      I am trying to connect up to the local mysql server via the SSH tunnel.

      You shall NOT use any other SSH client software for SSH-tunnelling then what comes with SQLyog! (that is the file plink.exe in SQLyog installation directory).

      I am not sure about what you mean exactly but I get the impression that you try to tunnel SQLyog through a SSH-tunnel created with another application.

    • #19322
      zleviticus
      Member

      Wow been a long time since i looked at this as i had kind of given up hope. =)

      Ok here is the situation i am trying to do.

      i am inside my corp network. i am trying to connect SQLyog to a remote server not on our network but hosted on another network.

      When we want to get to the server via a command line or to FTp into the server we need to use SSH. That works fine using a client OR using something like WSFtp to connect.

      However i am unable to connect up SQLyog to the remote server using the embedded SSH tunnel with SQLyog. I have no other ssh tunnels open at this the time that i try to use the program.

    • #19323
      peterlaursen
      Participant

      OK .. let's get back to the beginning! You wrote this

      Quote:
      when i try to connect or test i get the following error.

      Error 1045:

      Access denied for user admin username @ domain name (using password yes)

      now shouldn't it use localhost after the @ instead of the domain name?

      Now note that the error message is a MySQL Server error. There is no issue with tunnelling here! The communications' chain SQLyog <> SSH client <> SSH Server <> MySQL is functioning and this chain can process communication all the way through in both directions. It is a privilege issue! If SSH could not connect to MySQL error message would be the MySQL client error 2013 'Lost connection to MySQL server during query'

      I also think that your observation is correct, that MySQL does not allow for connection from remote hosts and it 'thinks' that this is what happening – and rejects the request for connection. Provided (of course) that the user credentials are all correct. A problem that is related to the routing system used at the remote network, I think.

      What 'domain name' is displayed in the error mesage ?

      The remote 'domain name' I guess?

      Would it be possible to allow connections from remote machines (only in MySQL user management – not elsewhere) for this user – just for a test?

      But this:

      Quote:
      On the main server tab i am using

      localhost

      an admin username

      an admin password

      port 3306

      Db is blank

      admin user/password are MYSQL user, OK? Not OS/SSH user ?!

    • #19324
      zleviticus
      Member

      yes the domain si the remote domain and the user name and passsword for the mysql account are correct.

      I just don;t think that the server is thinking i am locally connected.

      I am working on trying to get it to allow remote conections for that mysql user.

    • #19325
      John Newton
      Member

      I'm having a similar problem but I'm getting an error message – 'Lost connection to MySQL server during query'. Now, does this mean that I've successfully connected to the SSH host but getting lost trying to connect to the mySQL server?? Is there something that I need my hosting site to setup/enable??

      Thanks

    • #19326
      peterlaursen
      Participant

      @John:

      1) please (always) tell what version you are using!

      2) also explain more in detail when that happens?  Can you 'test connection' but not really connect?  Or does it happen (any arbitrary time) after connection has sbeen functional after a while

      The error message 'Lost connection …' is a (standard) MySQL client error message.  It is the MySQL client code that is compiled into SQLyog that generates this error.  Not 'Webyog code'.

      TCP port forwarding needs to be enabled in SSH configuration on the server, but it will be in 99.99% of cases.

      First read:

      http://webyog.com/faq/22_113_en.html

      Is it possible that you could post (here or in a ticket) a screenshot of your connection settings?  Just fake of paint any confidential details.

    • #19327
      John Newton
      Member

      My apologies – I using the current version of SQLyog Enterprise – just purchased it 2 or 3 days ago.

      I'm getting the error message when trying to test the connection.

      I'm able to use putty to connect to my host via ssh. I have put these values into the ssh tab on the connection screen.

      Using putty, I can then connect to mysql and get into the monitor. Again I put the same values into the mysql tab on the connection screen.

      When I test connection I get the error that the connection timed out.

      I've read through the tutorial and thread, but maybe I'm missing something.

      Thank you for the assistance and patients.

    • #19328
      peterlaursen
      Participant

      the problem is that when you are using the PUTTY the way that you describe it you are not tunnelling.  You are creating a shell from the remote machine on your local.  and that is something different.

      From your description as I understand it everything you do seems correct.

      There must be some issue with SSH tunnelling on the remote host.  You or your SysAdmin will need first to check whether TCP port-forwarding with SSH is enabled and functional on the host.

    • #19329
      jkocsis
      Member

      I have a similar problem to John's. I used to be able to connect with no problems using the SSH tunnel.

      My settings are like this:

      Server Tab:

      MySQL Host Address: localhost

      User Name: My DB user name

      Password: My DB password

      Port: 3306

      Default Charset: default

      Databases: blank

      Tunnel Tab:

      Use SSH Tunneling: checked

      Username: My SSH username

      Password: My SSH password

      SSH Host: the name of my remote host

      SSH Port: 22

      Local Port: 3310

      These settings would always work with no problems in the past. However, we recently made a change to the my.cnf config file. In the past we didn't use the “bind-address” parameter. We now added that and set the bound address to the IP address of the machine that is running the mySQL instance.

      Now when I try and connect using SQLyog I get the “Error No. 2013 Lost connection to MySQL server during query” message. If I change the “MySQL Host Address” field in the Server tab from localhost to the IP address we are binding to in the my.cnf file then I get the message “Error No. 1045 Access denied for user…” error. That would make sense since the user in MySQL is only allowed access from localhost.

      Is there a way to use the “bind-address” parameter in my.cnf and still use SQLyog? I'm using version 5.19.

    • #19330
      peterlaursen
      Participant

      would you use bind-adress = 127.0.0.1 ??

      Please explain more in detail what setup you would consider.

      Also try copying the host file in here!

Viewing 11 reply threads
  • You must be logged in to reply to this topic.