Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Remotely login to mysql
PostPosted: Thu Feb 27, 2014 8:22 pm 
Offline
Newbie

Joined: Thu Feb 27, 2014 8:16 pm
Posts: 2
So I've set up mysql using the following instructions... https://library.linode.com/hosting-website and I downloaded MySQL Workbench. I am able to login through command prompt, but it doesn't let me login remotely. I get an error saying "Failed to Connect to MySQL at ip.address.here with user username". I know when I had a shared hosting site, I had to white list my computer's address, is that true for this too? How would I go about doing that?


Top
   
PostPosted: Thu Feb 27, 2014 9:17 pm 
Offline
Senior Member

Joined: Sun May 23, 2010 1:57 pm
Posts: 315
Website: http://www.jebblue.net
Set up an ssh secure tunnel to your Linode. Then connect MySql Workbench to localhost:3306 if that's the local port you decide to setup your tunnel for.


Top
   
PostPosted: Fri Feb 28, 2014 1:21 pm 
Offline
Senior Member

Joined: Tue Aug 02, 2011 2:45 pm
Posts: 55
When you setup your connection in Workbench did you change the "Connection Method" to "Standard TCP/IP over SSH?"

Give that a try and see if it works. You'll look like you are connecting locally to the MySQL server and you will never have to worry about white listing anything other than localhost. Then you can stop 3306 connections from coming through the firewall and bind MySQL only to localhost on the server.

If you did that already, did you set the "MySQL Hostname" to "localhost" or "127.0.0.1?" in the connection setup?


Top
   
PostPosted: Fri Feb 28, 2014 3:07 pm 
Offline
Newbie

Joined: Thu Feb 27, 2014 8:16 pm
Posts: 2
I got it working... yeah I wasn't using the "over SSH" option. When I do it over SSH it worked fine.

Are there any drawbacks doing it threw SSH though?


Top
   
PostPosted: Fri Feb 28, 2014 5:02 pm 
Offline
Senior Member

Joined: Tue Aug 02, 2011 2:45 pm
Posts: 55
No drawbacks that I know of (doesn't mean there aren't any). The big plus is security, no worries about someone guessing your database password and compromising everything because they have to be logged in via SSH first to access MySQL. I use SSH keys as well to make sure there is no way to log in via SSH without my key.

Exposing MySQL to the world basically exposed my entire server because everything was stored in there.


Top
   
PostPosted: Fri Feb 28, 2014 5:40 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
Just the normal overhead of an encrypted session. Since Mysql management is all text, and not that much of it, you'll probably never notice.

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


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

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group