Need iptables without mariadb

I’m getting an error message in my email after enabling iptables. If I enable mariadb, the error messages stop. But I don’t need mariadb. How do I get iptables to work without mariadb?
The error comes like this

Can’t connect to MySQL localhost
ERROR 2002 (HY000): Can’t connect to local server through socket ‘/run/mysqld/mysqld.sock’ (2)