forums › forums › SQLyog › Using SQLyog › Tunneling Issue With Ssh And Localhost
- This topic is empty.
-
AuthorPosts
-
-
September 29, 2005 at 3:09 am #9260zleviticusMember
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?
-
September 29, 2005 at 3:35 am #19320peterlaursenParticipant
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 tunnelAre 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.
-
September 29, 2005 at 3:52 am #19321peterlaursenParticipant
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.
-
January 20, 2006 at 8:42 pm #19322zleviticusMember
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.
-
January 21, 2006 at 1:58 am #19323peterlaursenParticipant
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 usinglocalhost
an admin username
an admin password
port 3306
Db is blank
admin user/password are MYSQL user, OK? Not OS/SSH user ?!
-
January 21, 2006 at 3:14 pm #19324zleviticusMember
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.
-
March 8, 2007 at 8:45 pm #19325John NewtonMember
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
-
March 9, 2007 at 5:27 am #19326peterlaursenParticipant
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.
-
March 9, 2007 at 5:42 pm #19327John NewtonMember
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.
-
March 10, 2007 at 6:19 am #19328peterlaursenParticipant
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.
-
April 10, 2007 at 2:23 pm #19329jkocsisMember
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.
-
April 11, 2007 at 11:49 am #19330peterlaursenParticipant
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!
-
-
AuthorPosts
- You must be logged in to reply to this topic.