check user_name, password and database are correct
or
connect to the database using the user/pass… using SQL utility., then use the same user/pass and database in your connection.
With the above, you can find out whether the server is up and running and accepting connections.