Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable remote connection to mysql (Debian,Firewall) [closed]

I want to disable outside connections to my mysql in debian, with firewall. i only know that it has to be inside the iptables.test.rules file

Thanks in advance.

like image 936
user3091943 Avatar asked Dec 18 '13 11:12

user3091943


People also ask

Can't connect to MySQL server on remote host?

To allow remote access to MySQL, you have to comment out bind-address (you did) and skip-networking in the configuration file. Next, you have to make sure the user is allowed remote access. Check your user with this: SELECT User, Host FROM mysql.

Why MySQL database is not connecting?

normally means that there is no MySQL server running on the system or that you are using an incorrect Unix socket file name or TCP/IP port number when trying to connect to the server. You should also check that the TCP/IP port you are using has not been blocked by a firewall or port blocking service.


1 Answers

The best way to disable external connections to your MySQL is setting bind-address=127.0.0.1 in my.cnf configuration file. If you still need to block MySQL external access using firewall, you drop or reject all packets sending to 3306 port.

like image 81
archydragon Avatar answered Oct 22 '22 22:10

archydragon