Jump to content

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

Database:

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.

post-131649-13482403234355_thumb.png

Link to comment
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.

Link to comment
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/

 

Advanced:

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:

post-131649-13482403234722_thumb.png

Link to comment
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.

post-22624-13482403235005_thumb.png

post-22624-13482403235356_thumb.png

post-22624-13482403235831_thumb.jpg

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.