if you set dreamweaver to use the remote server as the testing server, the database it will connect to is the remote one, it will not be able to connect to your local testing MySQL Server unless you set the testing server settings to connect to your local php server.
where the testing server settings are set to use the remote server, your database connection should also be connecting to the remote MySQL server.