Error establishing database connection when running mamp on port 80

I’m trying to run Mamp appache on port 80, because the application(wordpress MU) doesn’t allow port-numbers in the domain-name.

When I run appache on the default MAMP-port, I manage to get a connection to the database, but when I run it on port 80, I get Error establishing database connection.

Read More

While on port 80, I have tried using both the default MAMP-port and default mySQL-port, I have also tried specifying the ports according to wordpress specifications, ie:

 define('DB_HOST', 'localhost:8889');

Nothing of this makes any difference. I’m clueless what should I do?

Related posts

Leave a Reply

1 comment

  1. When using MySQL port 3306,

    mamp ports

    this is the host: define('DB_HOST', 'localhost');.


    Related:

    WordPress MultiSite Subdomains on MAMP
    The easiest and recommended way of setting up WordPress MultiSite is to use sub-directories. So when you create a new site named “business”, it will be located at http://localhost/business/. Here’s a mini-tutorial on how to use sub-domains for your network sites.