Link to home
Start Free TrialLog in
Avatar of narmi2
narmi2

asked on

MySQL remote connection

What permissions does a user of MySQL need to be able to connect remotely to a database?

I currently have the permissions:

mysql> select host,user,password  from mysql.user where user='root'
+-----------+------+-------------------------------------------+
| host      | user | password                                  |
+-----------+------+-------------------------------------------+
| localhost | root | *DDCFCFAB8ACBA3ADB5C2B44A358FBF00130CAF32 |
+-----------+------+-------------------------------------------+
1 row in set (0.00 sec)

mysql>
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of narmi2
narmi2

ASKER

From my local machine, I am using the following command to create an SSH tunnel to the remote server

ssh -L 5424:localhost:3306 root@xx.xxx.xxx.xx

I then run MySQL query browser from the local machine to connect to the remote server via the SSH tunnel, but it does not work.

It says that root@localhost does not have the rights...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of narmi2

ASKER

I am trying to connect to the mysql server via a WAN, not LAN.

So do the same rules still apply?  I don't understand if the permisions should be the IP address of the remote server, or the IP address of the local machine?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of narmi2

ASKER

I have added a new user to mysql and have added my local machines IP address as the Host.  But I am still getting the same error message when I try connecting.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
one very simple way;

download sqlyog...that I am using to connect remote db with ssh through this tool.
Avatar of narmi2

ASKER

I will not be able to continue this question until next week as I do not have enough resources as the moment.
Avatar of narmi2

ASKER

I want to use this technique or similar, but I can't seem to get it to work:
http://www.howtogeek.com/howto/ubuntu/access-your-mysql-server-remotely-over-ssh/
Thanks for the points!