Remote access for databases

2 posts / 0 new
Last post
#1 Fri, 08/31/2007 - 17:51
Renato

Remote access for databases

Hi there,

I have an application running using mysql and postgre, and my customers via a destop application (and it doesn't matter where they are) can access this information

So... my question is... How can I allow remote access for mysql and postgre for any ip?

thank you,

Tue, 09/04/2007 - 12:48
Joe
Joe's picture

Hey Renato,

It's different for each of them, and I'd recommend moving with caution on opening these ports to all IPs. MySQL and PostgreSQL are both thought to be pretty secure when kept up to date, but the mechanisms for talking to them isn't very secure...so man-in-the-middle attacks are possible.

For MySQL you can set it up to listen on a public address in the MySQL Database module. Click on "MySQL Server Configuration" and set "MySQL server listening address" to Any. The "MySQL server port" may also need to be set explicitly (3306 is the default MySQL port)...depending on how Ubuntu configures it by default. On Red Hat based systems, it is listening on the public port on any interface, by default...but no users have access except from localhost.

Which brings us to the other part of the equation. In the "User Permissions" page, click on the user you'd like to have outside access...make sure he/she has a password set!...and set the "Hosts" option to "Any".

For PostgreSQL, it's slightly different in that it uses a different security model (it's a little simpler, in that you only need to fill out one form).

Browse to "Allowed Hosts", and create a new one with "Any" as the host, and also set the user or users that have access. You can also specify the database(s) that hosts matched by this definition have access to.

Make sure any users setup this way have a password set.

--

Check out the forum guidelines!

Topic locked