Added a checking on server, dbname and username of database