I have set up my testing server and is all working on a local machine, when i click + to set up a new MySQL Connect and enter all the fields and test the connect its say Connnection was made successfully but when i click ok it dont save it.?
Here is the procedure you should ideally follow to setup a MySQL Connection on DW. Look through to see if you've missed our something. I'm posting screenshots for each step:
1. First off, Site > New Site. Fill in your Local Info here. See below for example. I'm using MAMP on my system.
2. Now, define your Testing Server - in my case I'm running PHP and MySQL on my localhost. Do note that I've specified localhost:8888 in URL Prefix as that's the port on which my MAMP installation executes. This may be different for you depending on your configuration. In default instances for MAMP/ LAMP/ WAMP its mostly 8888 for Apache and 8889 for MySQL. However, yours may be 80 for Apache and 3306 for MAMP (Default Web Ports). You need to check your local environment for this. If you're testing other sites locally using localhost/sitename, then you'll not have a port number that follows. You could just leave it localhost/prefix-to-your-site-root-folder
3. Now, you're ready to create a MySQL Connection. If your Databases tab doesn't show up, click on Window > Databases for it to show up. If your Database tab is greyed out, keep in mind that you need to first create a new page (PHP) for it to become active before you could create a new connection.
4. Click the + icon and select MySQL Connection
5. You'll see this window
6. Define your MySQL Connection. In my case, as mentioned earlier, MySQL is running locally at root. So, MySQL server parameter is localhost. If you're connecting to a remote server, you need to specify the remote server's IP or domain name here with the username and password to gain access to your SQL databases. Make sure your username has access to the Database that you'd like to select or DW wont show up your desired DB. Once you fill in the information, click on Select next to Database parameter.
7. Select Database dialog will show up. Choose the desired DB that you're going to use. If you haven't created one already, you need to create it using MySQL DB Wizard/ phpMyAdmin first for your DB to show up here. Keep in mind, DW will only let you choose a DB, not create one on your server.
8. Once you choose the desired DB (in my case for testing purposes, I've chosen sqlcon, click Test
9. You'll see this dialog box once DW successfully connects to your DB. This may take a little longer if you're choosing a remote DB. Click OK to close the success message dialog. Click OK again to close MySQL Connection Dialog.
10. You'll notice that the MySQL Connection you created will appear in the Databases tab.
11. Also, You'll see that DW would've automatically created a folder called Connections in your Files tab along with a file within it that lets your site connect to your MySQL DB.
Once you're done with this, you just need to save any changes you may have made to your page and close it. Your connection will remain attached to the site until you remove it.
Trust this helps.