Solved

Secure Remote Access to mySQL

Posted on 2006-06-26
8
536 Views
Last Modified: 2012-06-27
Hi all
I currently have a remote web host that is running mySQL. Coming from a management point of view i would like to have access to my databases so that i can run apps like SQLyog and mySQL admin, thus i need remote access. Now, i suppose i could use phpmyadmin to manage the database, but trying to do something like that via a web interface becomes an absolute nightmare after a while.

Thus, to gain remote access for mySQL, typically i would need to open 3306 (note, from a security point of view i could choose a different point). Now i was talking to someone today and they said "...if you care about your data in a mySQL database you shouldn't allow remote access to your databases." Is this a real problem with mySQL or was this person just a mySQL basher??? Now i know that there will be some risks now that you have a port open but in my eyes the risk is no more than running phpmyadmin.

So is there anyway of having relatively secure remote access to my mySQL OR is there a better way of managing the db remotely whilst still being able to run these apps???
Thanks
ant
0
Comment
Question by:CVSmarc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 30

Accepted Solution

by:
todd_farmer earned 500 total points
ID: 16989609
There certainly are ways to expose the MySQL server in a relatively secure manner.  Of course, MySQL is one more program that can (and does) have bugs that can be exploited to gain access both to the data residing in the server, but potentially to other data on the server as well.  There are guidelines published on the MySQL website that will get you started:

http://dev.mysql.com/doc/refman/5.0/en/security.html

An alternate approach to managing the content would be to manage a local copy of your database via SQLyog and then update the production database from your local copy.  This would work better if most of your modifications were inserts as opposed to updates or deletes, of course, but even that could be managed.  It gets much more complicated if you have to work with a team of people responsible for managing the content.
0
 
LVL 4

Author Comment

by:CVSmarc
ID: 16989673
Thanks for the quick response.
Is it common to find a web hosting company that allows remote connections like this to their client databases.
ant
0
 
LVL 30

Expert Comment

by:todd_farmer
ID: 16989700
My experience has been pretty good here.  My first hosting company allowed remote connections - no questions asked.  The second hosting company did not allow remote connections to the server they initially configured me for, but when I specifically asked, they set up a new database for me on a publicly-accessible MySQL server instance.  A third company (cheap) provided remote access out of the box - no questions asked.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 4

Author Comment

by:CVSmarc
ID: 16989747
lol... seems like a bit varied response there. Would you say that in your experience then, if you db is being hosted by a company that is allowing remote access to the database, that the databases are secure (as much as they can be at least and assuming that they take the security steps recommended for allowing people to remotely connect to the db).

Also is this any more and any lest secure than using SQLyog to connect to a mysql database via HTTP tunnel (note sure if you have had experience with this type of connection or not).
Thanks ant
0
 
LVL 30

Expert Comment

by:todd_farmer
ID: 16989773
I think it runs the gamut.  Some hosting companies really know what they are doing and their databases are well-configured and managed in a secure manner.  Others just throw them up there, give you an account and password, and let you go to it.  I haven't used HTTP tunnel before.
0
 
LVL 4

Author Comment

by:CVSmarc
ID: 16989924
Well i suppose the question comes down to how will i be able to pick a host that "now what they are doing and their databases are well-configured and managed in a secure manner"??? Is there something that i should ask or be addressing, that would let one know whether the host is a host the is well managed and secure?
Thanks
ant
0
 
LVL 30

Assisted Solution

by:todd_farmer
todd_farmer earned 500 total points
ID: 16989950
For starters, look for a hosting company that is using current versions of MySQL (production version is currently 5.0).  Anything less than 4.1 is, in my book, unacceptable and a sign that they don't know or care to keep current with releases.  Ask what restictions are placed on remote access - I would be more comfortable with a host that provides remote access only upon request.  Many hosts probably won't answer a direct question of, "how have you hardened your MySQL installations?" - for pretty obvious reasons.
0
 
LVL 4

Author Comment

by:CVSmarc
ID: 16989963
Cool...
Thanks a lot for help.
ant
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question