

There are really only two things that need to be correct for dreamweaver to connect to your database:
Your Testing Server in dreamweaver (usually issues are with a bad Server URL)
Your Database Credentials (if it works on your live site, the credentials are correct. You can get the correct server name from the top of your phpMyAdmin page while viewing the database)
In your case you had a missing https;// in front of your testing url and the server host was set to the wrong domain. Correcting these two issues allowed dreamweaver to connect to your database.