mariovaldez.net

MV.net forums
It is currently 14 Jul 2016, 00:50

All times are UTC - 7 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
PostPosted: 10 Mar 2005, 13:54 
Hello,
First I want to thank Mario for all his work on this software. I just discovered it today and am excited to use it in the future.

I can connect to my database just fine if I have the "Use SSH" checkbox unchecked. There is no doubt that I have SSH access to the server as I use putty all the time. We have our own virtual server with root access. If I click the Test Tunnel button plink.exe opens and connects. However, if I check the "Use SSH" checkbox and then try to connect to the database I get an error dialog stating "Error while connecting to database (mydatabase @ 127.0.0.1)
SQL Error: Access denied for user: 'myuser@localhost' ..."

I don't have it configured to use localhost, I have it configured to use the proper domain name where the mysql server is. Why is it changing to localhost? Like I said before, I can connect fine without SSH...

Thanks in advance.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: 11 Mar 2005, 12:35 
Ok, I wasn't thinking this one through before I posted my question. All I needed to do was to grant my mysql user localhost priviledges...all is good now


Report this post
Top
  
Reply with quote  
PostPosted: 12 Mar 2005, 07:22 
User avatar

Joined: 06 Mar 2003, 03:21
Posts: 447
Location: Monterrey, NL, Mexico
slaxin:

> I can connect to my database just fine
> if I have the "Use SSH" checkbox
> unchecked... if I check the "Use SSH"
> checkbox and then try to connect to the
> database I get an error dialog stating
> "Error while connecting to database
> (mydatabase @ 127.0.0.1) SQL Error:
> Access denied for user: 'myuser@localhost' ..."
> All I needed to do was to grant my
> mysql user localhost priviledges...all
> is good now

Hi. You already solved this problem, but I'll explain it anyway because some persons find a bit hard to understand the SSH tunneling.

When SSH tunneling is not enabled, the OSCPMWin application will connect directly to a MySQL server. So, the hostname used to connect is the usual server name (if local it maybe "servername", if not in the LAN, it maybe "servername.com" or "www.servername.com"). The server will receive the connection and it will see the OSCPMWin connection as coming from the IP number of your workstation.

On the other hand, when SSH tunneling is enabled, the application first will launch PLink to make the SSH connection to the server. So, PLink will connect using the "servername" or "www.servername.com" (or something like that) and the SSH daemon in the server will receive the connection from the IP number of your computer.

However, after the SSH tunnel is established, the MySQL connection won't be done directly between the server and the OSCPMWin application. The OSCPMWin application will connect to localhost (or 127.0.0.1), that is, your own workstation. PLink, running in your workstation will receive the connection and will encrypt it and redirect it to the SSH server. In the server, the SSH daemon receive the tunnel request and then redirect the connection to the local MySQL daemon. So, for MySQL, the connection is not coming from the IP of your workstation, but it is coming from the SSH daemon running in localhost.

That's why the MySQL user should have permissions to connect from localhost.


Regards,

Mario A. Valdez-Ramirez.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: ssh
PostPosted: 11 Apr 2006, 17:23 
Hello,

I get the following error when trying ssh.

Code:
Error while connecting to database (databasename @ 127.0.0.1). SQL Error: Lost connection to MySQL server during query


I cant connect at all when ssh is not checked and get the following

Code:
Error while connecting to database (databasename @ localhost). SQL Error: Cant connect to MySQL server on "localhost' (10061)



Any ideas what I am doing wrong, first I tried without SSH using the configurations I have for oscommerce. same error as above, then tried ssh and I seem to be almost getting there.

I am hosted on a shared server and I am trying to access it remotely. In the control panel my hoster provides there is a thing for ssh access, it gives me stern warnings but lets me in to the ssh[/code]


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: 14 Apr 2006, 07:04 
Im still having problems getting this to work, is there anything I can do. The software looks tight but cant get it to work.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group