ODBC connection to MySQL database

Hello

First of all, thank you for your tremendous work with DietPi

I have install Lighttpd + MySQL database in a Raspberry Pi 1.
I have also managed to configure no-ip account in order to access MySQL database through phpmyadmin outside my LAN
with hxxp://pbi.ddns.net/phpmyadmin/.

I’m now trying to get access to the database using a ODBC connection. In order to do it, I need to configure in a Windows PC the recommended MySQL 32 bit ODBC connector. Following the manual, it says that port 3306 is the one to be used to obtain a connection.
While configuring the connection, the manual says to enter IP (hxxp://pbi.ddns.net/) and port 3306, but I get a message error “connection refused”.

Even if my RPi1 internal IP is added to the DMZ list in my router and “everything is exposed to an outside connection”, I believe something must be done in DietPi in order to give access to MySQL database in port 3306.
I’m a “noob” in Linux but I think the issue may be related to Iptables and allow incoming request on port 3306.
Any thoughts on this? Am I wrong?

I’ve read about iptables in Linux and the examples are al targeted to Ubuntu so, as I don’t want to mess with my current DietPi Config, my question is: would it be safe to do as follows?

iptables -A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT

Thank you for Reading :slight_smile:

Lfonseca