Invalid query: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) Whole query: select distinct ip from complaint where is_pending != 1 and class_ab = ''