• Hi.
    I’ve recently upgraded to MAMP 5.2 and done a new install of WordPress, however I’ve got 2 other copies of MAMP installed on the same machine. This is causing issues with pointing the database and i get the “Error establishing a database connection”.
    I assume its because I have multiple copies of MAMP.

    So, can I uninstall these versions of MAMP without risking the databases?
    They all seem to have updated anyway and the local copies of my sites are only partial anyway, and I want to develop the sites locally anyway and use my duplicator backups. I’m happy to risk it as long as the copies of MAMP aren’t running off the same databases.

    I shall then run multiple copies of wordpress for each site off the single MAMP installation, which may thin out the process.

    I can’t post any links as this is all on my machine locally. And I’m just a boomer dabbling in tech, so no complex jargon, please.
    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Tyler

    (@tylerthedude)

    Hi there,

    This error regarding WordPress not being able to connect to the database could happen for multiple reasons. The first reason is that the MySQL server was not able to start whenever you first started up MAMP (it will load up the Apache web server and MySQL server). You may try checking if the server did in fact start, as the Apache server alone may have loaded.

    Another reason why this could be happening is your database user doesn’t have correct permissions for the database defined in the wp-config.php file. Assuming you don’t have a root user using the database, then you may try checking the permissions for the database user just to make sure it has the appropriate permissions for using the database.

    If both of the WordPress sites are using the same database, then I’d also make sure that the table prefixes for the sites are different. Normally, WordPress will pick up on a table prefix being used twice but it doesn’t hurt to check. You can see if this is the case by checking each site’s wp-config file. This can be done by entering the htdocs directory and click the WordPress installation folder, open the wp-config.php file and check to see that the $table_prefix variable for both sites are different.

    Regards,
    Tyler

    Thread Starter macnadoodle

    (@macnadoodle)

    Thanks Tyler, I’ll check that.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multiple MAMP copies causing issues?’ is closed to new replies.