views:

294

answers:

2

Hi Thanks for reading my question. I currently use Mac Terminal to use MySQL. I connect to either localhost or a remote server. Should I be using SSH?

+2  A: 

You won't need SSH to access a DB on your local machine.

You can use SSH to access a remote DB using MySQL. You can also use an app with a GUI like Sequel Pro to access the remote DB via an SSH tunnel.

What specifically are you trying to achieve?

Greg
Im trying to do three things. 1. developing a website locally. 2. I want to access/modify a database that is hosted on a remote server. 3. I want to FTP to the remote server. Should I use SSH for that as well?
RedEye
1. Check out Sequel Pro for the local work.2. Your options for the remote DB are phpMyAdmin, SSH, and Sequel Pro through an SSH tunnel. The correct option will depend on how your server is set up.3. If you are concerned about security you can use SFTP. Most FTP clients will support this - just specify port 22.
Greg
+2  A: 

There is not enough information to answer your question.

Normally SSH tunnels are used more for adhoc work, while preserving high level of security (can be used in production, too).

MySQL normally uses unencrypted traffic, but it can be setup to use SSL, so that's another path you can take.

Other alternatives are VPNs, for example OpenVPN among other solutions, but this is more of an infrastructure decision.

EDIT: For completeness

On local machine clients can communicate with mysqld over socket or local IP. Normally it is not necessary to encrypt such connections.

For remote connections (which are over IP), as stated mysql uses unencrypted connection and FTP by default also uses unencrypted connection. This might or might not be a security risk (if that particular network segment is on its own VLAN or inside already encrypted tunnel or on physically secured network).

If unsure - encrypt it.

Unreason