[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql
Subject:    Re: Is port forwarded connection taken as local?
From:       gerald_clark <gerald_clark () suppliersystems ! com>
Date:       2006-03-31 21:36:37
Message-ID: 442DA0E5.5020602 () suppliersystems ! com
[Download RAW message or body]

Bing Du wrote:

>Hello everyone,
>
>What I'm after is trying to figure out a way to centrally and remotely
>managing (e.g. on server1) our MySQL servers (server2 is an example) on
>different machines.  Right now, these MySQL servers are all set up to only
>accept logons from localhost.  My questions:
>
>1. server1 has to be able to connect to server2 directly via SSH, right?
>2. On server2, does 'grant ...to someuser@server1 identified by ...' have
>to be done?
>
>I've been looking through the relevent threads regarding how to make port
>forwarding for MySQL work.  I saw one thread mentioned that port forwarded
>MySQL connection was taken as a local connection.  But my own testing
>cannot agree with that.  I'm confused.  Here is what I did:
>
>On server1:
>
>server1% ssh -2 -l myusername -N -L 3307:server2:3306 server2
>
>server1% mysql -P 3307  (in another term window)
>
>ERROR 1045 (28000): Access denied for user 'myusername'@'localhost' (using
>password: YES)
>  
>
You need to grant permissions to 'myusername'@'localhost' as indicated 
in the line above.

>But on server2, the following command works fine.
>
>server2% mysql -h localhost -u myusername -p
>
>I'd appreciate if anybody would shed some light.
>
>Bing
>
>  
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=mysql@progressive-comp.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic