Keywords: WampServer | MySQL | MSVCR120.dll | Visual C++ Redistributable | check_vcredist | Windows 7 | VMware
Abstract: This article addresses the issue where MySQL server fails to start in WampServer on Windows 7 VMs, due to missing MSVCR120.dll. It analyzes the cause and provides a solution using the check_vcredist tool to install necessary Microsoft Visual C++ Redistributable packages, with alternative methods included.
Problem Overview
On Windows 7 operating systems, especially in VMware virtual machine environments, users often encounter issues where the MySQL server fails to start when running WampServer. The specific error message is "mysqld.exe can't start because MSVCR120.dll is missing," indicating that the system lacks the necessary dynamic link library file.
Error Cause Analysis
MSVCR120.dll is part of the Microsoft Visual C++ 2013 Redistributable package. WampServer and its components, such as MySQL, depend on these runtime libraries for execution. If the corresponding version of Visual C++ Redistributable is not installed on the system, it leads to missing dll files, causing startup errors.
Solution: Using the check_vcredist Tool
The best solution is to use a dedicated tool to check and install missing components. check_vcredist.exe is a utility provided by the WampServer community that automatically detects the installed versions of Visual C++ Redistributable on the system and prompts users to install missing packages.
- First, download the check_vcredist.exe tool from the official website.
- Run the tool; it will scan the system and display the missing Redistributable packages.
- Based on the tool's prompts, download and install all recommended Microsoft Visual C++ Redistributable versions. It is advised to install all versions to ensure compatibility.
- After installation, restart the Windows system, then rerun WampServer.
This method is based on Answer 2 and has been verified as effective by the community.
Alternative Method
Referring to Answer 1, users can also manually install all versions of Microsoft Visual C++ Redistributable packages. These can be downloaded from the Microsoft official website and installed sequentially for versions 2008, 2010, 2012, 2013, 2015, 2017, etc. However, this method can be tedious and error-prone, so using the check_vcredist tool is recommended.
Conclusion
By using the check_vcredist tool, users can efficiently solve the MSVCR120.dll missing issue for MySQL in WampServer. This avoids the complexity of manual installation and ensures that all necessary dependencies are in place. This solution is particularly practical for users running WampServer in virtualized environments.