No connection could be made because the target machine actively refused it.
That's your problem.
Your database server is saying "no" to the connection attempts, so your web server can't communicate with it. Get that fixed and you should get your problems fixed up. That's most likely a firewall or MySQL configuration issue, so that would be the first place that I'd look. The MySQL logs should also tell you more about why the connection was refused in the first place.