if you set up the Testing Server settings in the Dreamweaver site definition to use FTP and connect directly to the site, you should be able to connect to the database. Dreamweaver uses the testing server site for connecting t othe database, so if the testing server connects directly to the host, then it wont be using a remote connection.
just make sure to set the server root if necessary and use the web address for the URL Prefix.