• Hey!

    I’m working locally on a website with a subdomain named shop.

    MAMP Pro trial expired so I moved to MAMP.
    I copied the databases from /Library/Application Support/appsolute/MAMP PRO/db to /Applications/MAMP/db, since the mysql databases folder is different for each version.

    Now the main website works perfectly fine, but the shop doesn’t. I get “error establishing database connection”.

    The wp-config file is set up correctly. I checked everything a dozen times.

    Does anyone know what could be the problem? How could one database work and one not since I moved everything in one bulk?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Actually it’s very hard to pinpoint the problem, I guess your shop page database is having difficulties to get connected into database.

    Dion

    (@diondesigns)

    First, never, EVER move raw MySQL directories. Many files/libraries have hardcoded paths, and the mismatched paths will cause issues from corrupted databases to system crashes. In the future, please remember to export your databases using either phpMyAdmin (acceptable) or the mysqldump utility (preferred). You will then have copies of your databases in a format that can be imported into any MySQL installation on any server.

    OK, let’s deal with your situation. If you log in to phpMyAdmin using the root database user, is the “shop” database in the list of databases? If yes, then IMMEDIATELY export the database. If no, then you have some work ahead of you to attempt to recover teh database.

    Thread Starter AlinaGP

    (@alinagp)

    Yes, I can still see the database in the list.

    Thread Starter AlinaGP

    (@alinagp)

    I just copied the directory. The original is still in its place. Is there a way to access the original with MAMP?

    Dion

    (@diondesigns)

    When you checked the “shop” database with the root database user, did it still contain all its data? If so, then you should export the database to a local file.

    After you export the database, click the Users tab in phpMyAdmin and check whether the user that was accessing the “shop” database still exists. If not, then add the user and give it permission to access the database. If so, then verify it still has permission to access the database, and if not, change permissions accordingly.

    Thread Starter AlinaGP

    (@alinagp)

    I can’t access the database with the root user either.
    Yes, the user is still there with all the privileges granted. It was the second thing I checked after I checked the wp-config file. Then I tried the root user (with the necessary changes to wp-config)… still nothing.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘MAMP Pro to MAMP – error establishing database connection’ is closed to new replies.