Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Connecting to local MySQL db

Community Beginner ,
Jan 09, 2010 Jan 09, 2010

Copy link to clipboard

Copied

Hi.  I've got an existing site that is used for local use only.  I built it with DW CS4, MySQL and PHP on Windows.  I have since moved over to a Mac.  Installed MAMP locally, and opened DW CS4 on the Mac.

The database that the pages access have a few tables.  The home page has a quote of the day, accessed from the database in a table called Quotes.  The quotes of the day do not show up on the page when viewed with a browser.  However when I go to a page that is using data from another table in that same database, it works no problem.  I can edit/delete/add records through the browser as expected - just no Quote of the day.

So I check the connHome connection to the database in DW.  Under tables it says None.  I can open the DB in MySQL Admin and view the Catalogs and see all the tables.  I can use Navicat and access the data in all the tables including Quotes.

If I try to make a new MySQL connection I get: "An unidentified error has occurred", followed by the information found in the attached image...

In Manage Sites I have tried using URL Prefix as http://localhost, http://127.0.0.1, http://localhost:8889 (port that MySQL setup in MAMP), and some others.

I'm sure it's something simple but with so many places to look, I'm just wondering if anyone else knows what might be going on.

I'm running MAMP 1.8.4, OSX 10.6.2, Firefox and Safari to view pages, DW CS4 OSX.

TOPICS
Server side applications

Views

604
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 09, 2010 Jan 09, 2010

Copy link to clipboard

Copied

If you're using MAMP with the default ports,you need to add :8888 after localhost for your URL prefix. See http://www.adobe.com/devnet/dreamweaver/articles/setting_up_php_03.html.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 10, 2010 Jan 10, 2010

Copy link to clipboard

Copied

David,

Got it fixed.  After replacing the stock MAMP ports with standard 80, 3306, and changing URL prefixes in BOTH Local and Testing sections, I was able to view a list of my tables in DW.

One odd thing though.  To get the quotes of the day to work, I had to delete the PHP code which pointed to the fields for the quote and author, and re-dragged them into the page and now it's working.  Any idea why those links would break?  Of course I am editing pages that were done on Windows and I had nothing but odd behavior when editing PHP with Server Behaviors - don't have those problems with my Mac.

Steve

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jan 10, 2010 Jan 10, 2010

Copy link to clipboard

Copied

LATEST

Code created on Windows should be identical to code created on a Mac. I suspect the links broke because there was something wrong with your setup on Windows. I use both Windows and Mac. There's no difference.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines