Page 1 of 1

external database access / mysql

Posted: Fri 8. Nov 2019, 18:44
by tom83
Hi,

What are the steps to make external database (mysql) access?

Also, I tried to create a rule into Firewall, and there's no "Save" button? When I go back into that screen, the rule is gone.

Re: external database access / mysql

Posted: Fri 8. Nov 2019, 23:51
by tom83
Oh I found the save button now. But still can't enable remote access.

Image

Re: external database access / mysql

Posted: Mon 18. Nov 2019, 20:03
by tom83
Anyone? How do you guys connect mysql using external connection (like MySQL Workbench for example). Which steps should I make to make this external connection work?

Re: external database access / mysql

Posted: Mon 18. Nov 2019, 20:14
by Enigma
There's a configuration option for this within KeyHelp. I'm using the German version, but it should be something like Configuration > System > Database Server. The first option there allows external access.

It would be more secure to use an SSH tunnel, though. Several programs have this feature built-in; Navicat is a nice one, for example, but it's not free. You can use free tools like PuTTY to create a tunnel and then use any program with it.

Cheers,
Jan

Re: external database access / mysql

Posted: Fri 22. Nov 2019, 20:52
by tom83
Hi,

Thanks for answer. I've done this Configuration > System - Database Server > [X] Enabled Allow remote access, and also allow port on Firewall.

It doesn't work. I would need to connect without tunnel for an external server application that connects to this server's database.

Anything else should need to activate maybe?

Re: external database access / mysql

Posted: Fri 22. Nov 2019, 21:21
by Martin
Hello,

there is also a third step needed: Within the setting of the specific database you must allow connections from your external host.

Re: external database access / mysql

Posted: Sat 23. Nov 2019, 03:20
by tom83
Martin wrote: Fri 22. Nov 2019, 21:21 Hello,

there is also a third step needed: Within the setting of the specific database you must allow connections from your external host.
Hi Martin,

Thanks for answer. Wouldn't work the rule that I've made for any remote connection? Or did I made it wrong maybe?

Could you explain how can I make this rule exactly?

Really grateful.

Re: external database access / mysql

Posted: Mon 25. Nov 2019, 08:36
by Alexander
@tom83

I see a red box above your ACCEPT rule in your screenshot. It seems that your REJECT rule is above the MariaDB/MySQL rule, which leads to a rejection before it can be accepted by the MariaDB/MySQL rule. See the screenshot below for a correct order.

---

Summary of all required steps for admins looking for the same information in the future.

1. Step:
Enable MariaDB/MySQL to listen on the appropriate port.
"Configuration" -> "Database server" -> "Allow remote access"
x1.png

2. Step:
Enable the appropriate user to be able to use a remote connection.
"User-Administration" -> "Add user" / "Edit user" -> Tab "Resource & permissions" -> Scroll down to "Database remote access"
x2.png
x3.png

3. Step
Depending on your current Firewall rules this may be optional. Open the MariaDB/MySQL port in the firewall settings.
x7.png

4. Step
Within the user area of the user, who should be able to use remote database access, enable access to the appropriate database.
"Databases" -> "Add database" / "Edit database" -> "Remote access" and choose the desired option.
x4.png

Re: external database access / mysql

Posted: Sat 21. Mar 2020, 01:34
by tom83
Hi,

Thanks for all steps! I've made all those again, and I've changed the order (on firewall) like you said:
I see a red box above your ACCEPT rule in your screenshot. It seems that your REJECT rule is above the MariaDB/MySQL rule, which leads to a rejection before it can be accepted by the MariaDB/MySQL rule. See the screenshot below for a correct order.
And WORKED fine now.

ps.: I didn't know that the order on firewall rules would matter.... and it does.

Thank you! :)