[Solution] When the MySQL database is started, the memory cannot be read
Source: Internet
Author: User
In "MySQL installation directory \ bin", there is a libmysql. when installing MySQL, the installation program for Windows Installer will ask if we want to put "MySQL installation directory \ bin" into the environment variable path, generally, we agree to put it in the path.
After installing PHP and Apache, We need to manually add the PHP extended environment variables to the path. Generally, we will add this path to the end of the path.
When the Apache phpmodule calls the MySQL library to access MySQL, it first looks for the libmysql. dll file, and then the DLL uses the DLL in PHP ext to complete the access.
This is the problem. Because the MySQL environment variable in path is before the PHP environment variable, libmysql. the DLL file is MySQL, but the DLL file is provided by PHP Ext, and PHP ext also provides its own libmysql. DLL, but it is not used because of the priority problem, and according to the installation method I just described, it will cause libmysql with MySQL. DLL to access other DLL files in PHP Ext, which may cause version inconsistency and crash. the absolute method is very simple. The LS method is to put libmysql of PHP ext into system32, and I think it will increase the priority of this dll. The other method is also recommended by me, it is to change the order of the PHP ext and MySQL bin directories in the path settings, or directly Delete the MySQL bin.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.