Home > Database > Mysql Tutorial > body text

How to Fix the \'Missing MySQL PHP Extension\' Error?

Linda Hamilton
Release: 2024-11-04 02:12:01
Original
705 people have browsed it

How to Fix the

Resolving the "Missing MySQL PHP Extension" Error

When installing WordPress or other PHP applications requiring MySQL, users may encounter an error indicating that the MySQL PHP extension is missing. This article addresses this issue, providing a step-by-step guide to resolving it.

Verifying MySQL Installation

The first step is to ensure MySQL server is running. Execute the following command in a shell prompt:

/etc/init.d/mysql status
Copy after login

If MySQL is not running, start it using:

/etc/init.d/mysql start
Copy after login

If it's not installed, install it with:

apt-get install mysql-server
Copy after login

Installing PHP MySQL Module

Next, install the PHP MySQL module using:

dpkg --list | grep php5-mysql
Copy after login

To install the module, run:

apt-get install php5-mysql
Copy after login

Restarting Apache

Finally, restart the Apache web server to make the changes effective:

/etc/init.d/apache2 restart
Copy after login

These steps should resolve the "Missing MySQL PHP Extension" error, allowing you to continue with your PHP application installation.

The above is the detailed content of How to Fix the \'Missing MySQL PHP Extension\' Error?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template