Upgrade mysql version for MAMP

Upgrade mysql version for MAMP

July 17, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Upgrade mysql version for MAMP

Upgrading MySQL Version for MAMP: A Comprehensive Guide

Hello there! Today we’re going to tackle an issue that many developers face when setting up local development environments using tools like MAMP—how to upgrade the MySQL version to support your project’s database requirements.

The Problem: Incompatible Database Versions

You’ve likely encountered this scenario before. You have a Magento (or other) project with a database created in a newer MySQL version, but your local development environment is still running an older version via MAMP. When you try to import the database using PHPMyAdmin, you’re greeted with an error message about invalid formatting or syntax.

The root cause? Your imported database was created on a server running a version of MySQL that’s incompatible with the one currently installed in your MAMP environment. In your case, the issue is between versions 5.7.34 and 8.0.X—a significant gap to bridge.

The Solution: Upgrading MAMP MySQL Version

Thankfully, upgrading the MySQL version in MAMP isn’t a complex process once you understand the steps involved. Let’s dive right into it:

Step 1: Uninstall and Remove Existing MySQL

Before we can upgrade, we need to get rid of the current MySQL installation that comes with MAMP.

  1. First, uninstall MAMP if it’s currently installed on your system. Make sure to select the option to remove all components during the uninstall process.

  2. After the uninstall is complete, navigate to the following directory and delete the mysql folder:

    /Applications/MAMP/db/mysql57
    
  3. Also, delete the /Applications/MAMP/tmp/mysql57 folder.

Step 2: Install a New MySQL Version

Now that we’ve cleared the way for an upgrade, let’s install a new version of MySQL that matches your project’s database requirements (in this case, something around version 8.0).

  1. Head over to the official MySQL download page (https://dev.mysql.com/downloads/mysql/) and select the appropriate version for your operating system.
  2. Download the Mac OS X (x86, 64-bit), DMG Archive package (as of this writing, you’ll want something around MySQL Community Server version 8.0).
  3. Once downloaded, open the .dmg file to mount it on your desktop.

Step 3: Install MySQL in MAMP

With our new MySQL version ready, we can now incorporate it into MAMP:

  1. Open the mounted DMG image and run the mysqlinstaller.app application.
  2. Follow the installation process; make sure to select “Custom” for the setup type so you can specify the install location.
  3. In the next window, change the destination folder to /Applications/MAMP/db/mysql80.
  4. Click through the remaining steps of the installer.

Step 4: Configure MAMP

We’re almost there! Now we just need to configure MAMP to point to our new MySQL installation:

  1. Open the Terminal app and navigate to your MAMP directory:

    cd /Applications/MAMP/bin
    
  2. Run the following command to change the MySQL version:

    ./macports -q rm mysql57
    
  3. Then, configure the my.cnf file in your new MySQL folder:

    nano /Applications/MAMP/db/mysql80/my.cnf
    
  4. In the opened editor, adjust the port setting to match your project’s database port (usually 3306).

  5. Save and close the editor.

Step 5: Restart MAMP

The final step is to restart MAMP:

  1. Open the MAMP application.
  2. Click “Start Servers” to launch both Apache and MySQL on your new configuration.

Troubleshooting Common Issues

If you encounter any issues during this process, here are a few things to check:

  • Ensure that you’ve correctly updated the my.cnf file with the appropriate port settings.
  • Verify that MAMP was able to locate and use the new MySQL installation. You can check this by running mysql -v in your terminal—it should display the version of the MySQL client being used.
  • If issues persist, try restarting your system or reinstalling MAMP entirely.

Conclusion

Upgrading the MySQL version within MAMP is a straightforward process once you understand the steps involved. By carefully following this guide and ensuring that all components are properly configured, you should be able to successfully upgrade your local development environment without any major disruptions.

Remember, always backup your existing databases before making such changes to avoid data loss. If you’re working with a team or have complex projects, consider using version control systems like Git (https://laravelcompany.com/blog/version-control-with-git/) to manage your database migrations and schema updates.

Happy coding!

Database Admin Configuration Deployment

Our network