Invalid query: Access denied for user 'ec2-user'@'localhost' (using password: NO) Whole query: select distinct ip from complaint where is_pending != 1 and class_ab = ''