Jump to content


This topic is now archived and is closed to further replies.


Connecting to MySQL database from Dreamweaver CS5

Recommended Posts

Hi, I am currently taking a PHP class. I have MAMP on my mac and using PHPMyAdmin for my database. I can get in to PHPMyAdmin from MAMP. I also can test my website online through MAMP: http://localhost:8888...I know this because when I made a change earlier today in the CSS, it updated online. My files are in htdocs folder.


When in Dreamweaver, I am trying to set up MYSQL Connection. I am not making a connection. I was trying to use default settings that MAMP said to use.

Connection name: (is this localhost?)

MYSQL server: (is this localhost?)

User name: root

Password: root


When trying to connect to database, it goes through the testing loop and then I get: An unidentified error has occured. Then the next error (attached).


Can anyone help? If I am not being explicit enough, please let me know so I can clarify anything.


Share this post

Link to post
Share on other sites

Make sure that MAMP is using the default MySQL port.  In MAMP, go to Preferences then click on "Set to default MySQL and Apache Ports".


MAMP comes with some non-standard port values in an attempt not to conflict with OS X's built in webserver (also Apache).  So I make sure OS X web sharing is off then set the MAMP ports to default port.  Apache port 80 and MySQL port 3306.  I'm sure there's a way to tell DreamWeaver which ports to use but I've never bothered.


Also make sure you've set up a remote and testing server in your site definition


When setting up your connection the connection name can be anything you like. MySQL Server should be localhost.

Share this post

Link to post
Share on other sites

Thank you for your reply. I clicked on "Set to default MySQL and Apache Ports". Then, it set it to Apache port 80 and MySQL port 3306. Both the Apache and MySQL show up green. But then, an error pops up saying that Safari won't connect to the server. Same thing happened in Safari. :wtf: I set up a remote and testing server in the site definition but I could have done it wrong.


Local site folder: /Applications/MAMP


Servers: Server Name: localhost

Connection using: Local/Network

Server Folder: /Applications/MAMP

Web URL: http://[my computer's website number]:8888/



Remote Server: Maintain synchronization information

Testing Server: PHP MySQL


When they are reset to 8888 and 8889, they show up again in Safari. However, even though I have the site set up in Manage Sites, it does not show up on the site under databases.  :shrug:


Share this post

Link to post
Share on other sites

We're making progress!


Local site folder & Server folder should be: /Applications/MAMP/htdocs/ 


Remember that the MAMP directory is where the application executables reside (Apache and MySQL are) but the htdocs folder is where your hyper text documents are.


Web URL should be http://localhost/


Remember that we changed the Apache port from 8888 to 80. The :8888 on the end tells the browser to use a specific port (8888 in this case).  You could also use :80 but because that's the default port, it's assumed.


So in a browser just visit locolhost.  You don't even need the http:// in front of it.




Share this post

Link to post
Share on other sites

Yes, and thanks so much for checking back in.


You were right about:

Web URL should be http://localhost/


I adjusted Local site folder & Server folder: /Applications/MAMP/htdocs/ 


I also needed my connections folder at the root level.





Share this post

Link to post
Share on other sites

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.