mysql skip-networking OFF disable this mode commons-dbcp-1.4.jar add this library in the folder lib of application and base. table - create a table with block fields ip and blocked String stmt = "SELECT true blocked FROM block WHERE ip = " "+ con.getRemoteAddress () +" \ "LIMIT 1"; –--------