"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > How to Fix the \"Missing MySQL PHP Extension\" Error?

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

Posted on 2025-02-22
Browse:530

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

If MySQL is not running, start it using:

/etc/init.d/mysql start

If it's not installed, install it with:

apt-get install mysql-server

Installing PHP MySQL Module

Next, install the PHP MySQL module using:

dpkg --list | grep php5-mysql

To install the module, run:

apt-get install php5-mysql

Restarting Apache

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

/etc/init.d/apache2 restart

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

Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3