I had similar problems connecting to my mySQL database from DW8.
I noticed that you have localhost as your setting. Try changing this to mysql.mysite.com, where mysite.com is your DH site. You can get the exact name for the mysql hostname in the Control Panel under Goodies / Manage MySQL. It’s at the top of the page.
Also, I found that in order to permit DW to connect to your db, you have to add your IP address to the list of hosts that can connect to your database(s). Do this:
Still in Goodies / MySQL, at the bottom of the page you should see your existing database(s). Underneath “Users With Access”, click on the existing user’s name. Find the line: “From what hosts (computers) may “username” connect to these databases?” and enter the IP address of the computer running DWMX.
As long as your settings are correct you should now find that DWMX can connect to your mySQL database.
Hope this helps!