are you connecting to a Local mySQL Database? or a remote MySQL Database server?
If you are connecting to a remote database server, you may have to contact the host to have you IP address added to the allowed list.
the remote server may be set to disallow connections from unknown hosts.