I cannot access my db remotely, The only thing i found out is the port 3306 is open for 127.0.0.1, I want it open globally. The error i receives on accessing db is No connection could be made because the target machine actively refused it.
I have ubuntu 16.04
, Installed mariaDB
, The bind-address = 0.0.0.0
.
When i hit sudo netstat -plnt
it returns :
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN 21013/mysqld
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1172/sshd
tcp6 0 0 :::8080 :::* LISTEN 13710/apache2
tcp6 0 0 :::80 :::* LISTEN 13710/apache2
tcp6 0 0 :::22 :::* LISTEN 1172/sshd
tcp6 0 0 :::443 :::* LISTEN 13710/apache2
There is no 0 0.0.0.0:3306
.
How can i allow 0 0.0.0.0:3306
.
sudo ufw status
returns :
Apache Full ALLOW Anywhere
22 ALLOW Anywhere
3306 ALLOW 161.202.20.0/24
3306 on eth1 ALLOW Anywhere
3306 ALLOW Anywhere
Apache Full (v6) ALLOW Anywhere (v6)
22 (v6) ALLOW Anywhere (v6)
3306 (v6) on eth1 ALLOW Anywhere (v6)
3306 (v6) ALLOW Anywhere (v6)
On accessing the DB remotely i receives No connection could be made because the target machine actively refused it.
.
bind-address = 0.0.0.0
?bind-address=0.0.0.0
is in/etc/mysql/mariadb.conf.d/50-server.conf
. @steeldriversudo netstat -plnt
should return0.0.0.0:3306
.bind-address
line (rather than trying to explicitly set it to 0.0.0.0)