I was using the following script to connect to the database:
// Define database connection constants
but it's not working anymore. I don't know if the port number has changed. I have checked the password and user.