Add new mysql version to wamp server manually

A great question!

WAMP (Windows, Apache, MySQL, PHP) is a popular development environment for web development. By default, WAMP comes with an older version of MySQL. If you want to upgrade to a newer version of MySQL, you can do so manually. Here's a step-by-step guide to help you add a new MySQL version to WAMP server manually:

Prerequisites:

  1. Make sure you have WAMP installed on your system.
  2. Download the desired version of MySQL from the official MySQL website: https://dev.mysql.com/downloads/mysql/
  3. Ensure that you have administrative privileges on your system.

Step 1: Stop WAMP services

  1. Open the WAMP manager by clicking on the WAMP icon in the system tray or by searching for "WAMP" in the Start menu.
  2. Click on the "Stop" button to stop all WAMP services, including Apache, MySQL, and PHP.

Step 2: Uninstall the existing MySQL

  1. Go to the "Control Panel" and click on "Programs and Features" (in Windows 10/8) or "Add or Remove Programs" (in Windows 7).
  2. Find "MySQL" in the list of installed programs and click on it.
  3. Click on the "Uninstall" button to remove the existing MySQL installation.

Step 3: Install the new MySQL version

  1. Run the downloaded MySQL installer (e.g., mysql-installer-web-community-8.0.22.0.msi for MySQL 8.0.22).
  2. Follow the installation wizard to install the new MySQL version. Make sure to select the "Custom" installation option and choose a different installation directory (e.g., C:\mysql\mysql-8.0.22) to avoid conflicts with the existing WAMP installation.
  3. During the installation, you will be prompted to choose the installation type (e.g., "Developer Default" or "Server Only"). Choose the option that best suits your needs.

Step 4: Configure the new MySQL version

  1. Open the my.ini file in a text editor (e.g., Notepad++) and update the following settings:
    • port = 3306 (or any other port you prefer)
    • basedir = C:\mysql\mysql-8.0.22 (or the directory where you installed MySQL)
    • datadir = C:\mysql\data (or the directory where you want to store the MySQL data files)
  2. Save the changes to the my.ini file.

Step 5: Start the new MySQL service

  1. Open the "Services" console by searching for "Services" in the Start menu.
  2. Find the "MySQL" service and right-click on it.
  3. Select "Start" to start the MySQL service.

Step 6: Configure WAMP to use the new MySQL version

  1. Open the WAMP manager and click on the "MySQL" tab.
  2. Click on the "Change MySQL" button and select the new MySQL version (e.g., C:\mysql\mysql-8.0.22\bin\mysql.exe).
  3. Click "OK" to save the changes.

Step 7: Test the new MySQL version

  1. Open a command prompt or terminal and navigate to the WAMP directory (e.g., C:\wamp\bin\mysql\mysql-8.0.22\bin).
  2. Run the following command to start the MySQL client: mysql -uroot -p
  3. If you see the MySQL prompt, it means that the new MySQL version is working correctly.

That's it! You have successfully added a new MySQL version to your WAMP server manually.