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? – steeldriver May 04 '17 at 11:13bind-address=0.0.0.0is in/etc/mysql/mariadb.conf.d/50-server.conf. @steeldriver – Comrade May 04 '17 at 11:20sudo netstat -plntshould return0.0.0.0:3306. – Comrade May 04 '17 at 11:22127.0.0.1, I want it open globally. The error i receives on accessing db isNo connection could be made because the target machine actively refused it.– Comrade May 04 '17 at 11:27bind-addressline (rather than trying to explicitly set it to 0.0.0.0) – steeldriver May 04 '17 at 11:33192.168.1%for the user to access the database. See https://dev.mysql.com/doc/refman/5.7/en/account-names.html and https://stackoverflow.com/questions/11742963/how-to-grant-remote-access-to-mysql-for-a-whole-subnet and https://stackoverflow.com/questions/6239131/how-to-grant-remote-access-permissions-to-mysql-server-for-user – Steve R. May 28 '17 at 02:05