LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-05-2011, 06:23 AM   #1
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Rep: Reputation: 30
mysql workbench SSH connection.


How can I use SSH to connect to my mysql server remotely?
SSH connects on port xxxx, so do I need to forward ports in the putty connection?
 
Old 04-05-2011, 07:28 AM   #2
MCD555
Member
 
Registered: May 2009
Location: Milan, Italy
Distribution: Ubuntu, Debian, Fedora, Oracle Linux
Posts: 109

Rep: Reputation: 10
Quote:
Originally Posted by qwertyjjj View Post
How can I use SSH to connect to my mysql server remotely?
SSH connects on port xxxx, so do I need to forward ports in the putty connection?
Try this:

Code:
ssh -L 3306:[your_IP_address]:3306 [username]@[ServerIp]
and take a look to this GREAT tutorial: http://support.suso.com/supki/SSH_Tu...ort_Forwarding

Hope this helps!
 
Old 04-05-2011, 08:16 AM   #3
qwertyjjj
Senior Member
 
Registered: Jul 2009
Location: UK
Distribution: Cent OS5 with Plesk
Posts: 1,013

Original Poster
Rep: Reputation: 30
I connect through putty and I set up a port forward of 3306 and connect through SSH.
However, whn I go to workbench on my client and try to connect it gives me the error that it is not allowed to connect.
I do not have 3306 open on the server but I didn;t think that was necessray when connecting through SSH as it tunnels it through the ssh port.

Last edited by qwertyjjj; 04-05-2011 at 08:17 AM.
 
Old 04-05-2011, 09:09 AM   #4
MCD555
Member
 
Registered: May 2009
Location: Milan, Italy
Distribution: Ubuntu, Debian, Fedora, Oracle Linux
Posts: 109

Rep: Reputation: 10
Quote:
Originally Posted by qwertyjjj View Post
I connect through putty and I set up a port forward of 3306 and connect through SSH.
However, whn I go to workbench on my client and try to connect it gives me the error that it is not allowed to connect.
I do not have 3306 open on the server but I didn;t think that was necessray when connecting through SSH as it tunnels it through the ssh port.
But SSH access to your linuxbox works, isn't it?
 
Old 04-05-2011, 11:49 AM   #5
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
Quote:
it gives me the error that it is not allowed to connect
You didn't say what the error message is, so I will assume that you are 'seeing' MySQL, but it is saying that the username / password are incorrect. One of the difficulties in connecting to MySQL remotely is that it identifies you as user@domain. If your users table is only setup for user@localhost, user@domain will be denied. Upon reading the thread, my initial thought was that the SSH tunnel would take care of this fact and you would appear as user@domain.that.you.ssh.into, but this may not be the case. I would suggest that you check to the MySQL logs and see if it is showing connections from user@your-local-domain. If it does, you will need to either put a wildcard in your user's ID or create a local and remote ID.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql workbench exploding upon build ninja master Linux - Software 1 07-28-2010 01:33 PM
MySql - mysql-workbench problem tamtam Slackware 1 07-27-2010 11:52 AM
MySQL Workbench for RedHat zeroquaranta Linux - Server 6 03-01-2010 02:49 AM
LXer: Visual MySQL Database Design in MySQL Workbench LXer Syndicated Linux News 0 06-12-2008 07:00 PM
MySQL Workbench grahamtysall Linux - General 1 07-27-2007 03:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration