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:
- Make sure you have WAMP installed on your system.
- Download the desired version of MySQL from the official MySQL website: https://dev.mysql.com/downloads/mysql/
- Ensure that you have administrative privileges on your system.
Step 1: Stop WAMP services
- Open the WAMP manager by clicking on the WAMP icon in the system tray or by searching for "WAMP" in the Start menu.
- Click on the "Stop" button to stop all WAMP services, including Apache, MySQL, and PHP.
Step 2: Uninstall the existing MySQL
- Go to the "Control Panel" and click on "Programs and Features" (in Windows 10/8) or "Add or Remove Programs" (in Windows 7).
- Find "MySQL" in the list of installed programs and click on it.
- Click on the "Uninstall" button to remove the existing MySQL installation.
Step 3: Install the new MySQL version
- Run the downloaded MySQL installer (e.g.,
mysql-installer-web-community-8.0.22.0.msi
for MySQL 8.0.22). - 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. - 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
- 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)
- Save the changes to the
my.ini
file.
Step 5: Start the new MySQL service
- Open the "Services" console by searching for "Services" in the Start menu.
- Find the "MySQL" service and right-click on it.
- Select "Start" to start the MySQL service.
Step 6: Configure WAMP to use the new MySQL version
- Open the WAMP manager and click on the "MySQL" tab.
- Click on the "Change MySQL" button and select the new MySQL version (e.g.,
C:\mysql\mysql-8.0.22\bin\mysql.exe
). - Click "OK" to save the changes.
Step 7: Test the new MySQL version
- Open a command prompt or terminal and navigate to the WAMP directory (e.g.,
C:\wamp\bin\mysql\mysql-8.0.22\bin
). - Run the following command to start the MySQL client:
mysql -uroot -p
- 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.