How have you configured the Testing Server Tab of your Dreamweaver Site Definition?
if you have set the testing server tab to use a local folder, when you enter Localhost as the mySQL server it will try to connect to your local computers mySQL server.
To connect to the remote MySQL server, set the testing server tab to connect to your remote host via ftp. other wise, if you have a local server up and running, use that instead, it will increase the speed of the Data Base panels if it does not have to connect to the remote host.