Accessing mysql server in jail from local network

skymoo

Cadet
Joined
Dec 23, 2020
Messages
7
I've installed mariadb105-server in a jail in order to serve as the database for my Kodi installation. I have configured the mysql server and imported my database, in the jail I can see the mysql server:

Code:
root@MySQL:~ # nmap localhost
Starting Nmap 7.80 ( https://nmap.org ) at 2020-12-23 15:17 MST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000038s latency).
Other addresses for localhost (not scanned): ::1
Not shown: 999 closed ports
PORT     STATE SERVICE
3306/tcp open  mysql

Nmap done: 1 IP address (1 host up) scanned in 7.44 seconds
root@MySQL:~ #


however from another machine on my network I can't:

Code:
-> % sudo nmap 172.16.0.41
Starting Nmap 7.91 ( https://nmap.org ) at 2020-12-23 15:13 MST
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 1.51 seconds
-> %


How can I make the mysql server in the jail accessible from other machines on the local network?

I've followed the instructions here on creating the jail.
 

gt2416

Patron
Joined
Feb 4, 2018
Messages
262
I think by default it is bound to the local 127.0.0.1 address and not your LAN ip. You can run sockstat -4 to check. Anyway heres a guide on how to get it setup for remote hosts.
 

skymoo

Cadet
Joined
Dec 23, 2020
Messages
7
Thanks, thats useful. However I managed to get it working somehow. Not entirely sure as it just seemed to start working.
 
Top