Home >Backend Development >PHP Problem >What should I do if mysql is not loaded in php?
Solution to php not loading mysql: First copy libmysql.dll to the system32 folder; then load the libmysql.dll file in the httpd.conf configuration file; finally restart the server.
The operating environment of this article: windows10 system, php 7.3&&mysql 5.7, thinkpad t480 computer.
During the actual learning process, we may encounter situations where the mysql module cannot be loaded. If we happen to encounter such a problem, don’t panic, let’s introduce the solution below.
The solution steps are as follows:
First copy libmysql.dll in the PHP root directory to c:\Windows\system32
Then copy conf\httpd in the Apache directory. Load libmysql.dll in conf
LoadFIle "x:\php\libmysql.dll" //Load libmysql.dll
LoadModule php5_module "x:\php\php5apache2_2.dll" //Load php module
Finally restart the server.
Related video sharing: php video tutorial
The above is the detailed content of What should I do if mysql is not loaded in php?. For more information, please follow other related articles on the PHP Chinese website!