What are the values you are using for your connection (minus the password) and what is the error you are getting in DW? It is usually a straight forward process to connect to the db from within DW. You would start by defining your site including the testing server, then with a page that has been saved to that site open go to the Database tab of the application panel.
From here add a new database connection. You will just need to supply the host, localhost should work if it is local, username and password. You will often connect with the root user on a localhost, then the password should be whatever it was set to during the setup.