Your PHP installation appears to be missing the MySQL extension which is required by WordPress.?
Asked by Bidyadhar Bindhani, in Internet & eBusinessSponsor Ads
Answers
Sara Hill Expert Needs Information World
1. Connect via SSH and check the PHP version To fix the problem, you should have a SSH access to the server. Connect to your Linux VPS via SSH and check the PHP version which is currently in use: php -v 2. Create Info.php file You can also check the PHP version by creating a simple info.php file in your public_html directory with the following content: <?php phpinfo(); ?> Once you create the file, open your favorite web browser and access the file. 3. Update the required packages If your are running an Ubuntu VPS and PHP 7, then run the following commands: apt-get update apt-get install php7.0-mysql 4. Restart the Web Server Then restart your Apache service for the changes to take effect, or if you are using Nginx + PHP-FPM, then restart the PHP-FPM service. 5. Update PHP In case you are running PHP 5, run the following commands: apt-get update apt-get install php-mysql Restart the appropriate service for the changes to take effect. 6. Search all the available packages containing MySQL To search all the available packages containing mysql, you can use this command: apt-cache search mysql On the other hand, if you are running a CentOS VPS and you have PHP 7 installed on the server, then run the following commands to fix the problem: yum update yum install php70w-mysql 7. Restart Apache Restart Apache or the PHP-FPM service in case you are using Nginx + PHP-FPM as a web server. If you have PHP 5 installed on your CentOS server, run the following commands: yum update yum install php-mysql Restart the appropriate service for the changes to take effect. To search all the available packages containing mysql, you can use the following command: yum search mysql Once you install the MySQL extension for PHP, you can return back to your WordPress setup. If the installation went OK, the message about the missing MySQL extension should not be presented to you. You can now continue with your WordPress setup. Oct 29th 2019 02:33 |
Czarina R. Content Manager and SEO
It's a mySql extension missing from your server.. this does not happen on a unix and apache servers.. your server could on windows.. if it is, request to have mySql enabled/installed.. Oct 30th 2019 01:08 |
Perhaps the login information in the database is incorrect or has been changed.
It could also be due to the database server not responding.
Or maybe your database has been corrupted.
In my experience, the cause is usually a server error.
However, it may still be due to other factors. Let's see how to fix this problem.
Does this problem also occur with / wp-admin /?
Please check if you can access the Admin. By visiting / wp-admin /.
If the message still says "Error establishing a database connection".
Then to the next step:
For example: “One or more database tables are unavailable. The database may need to be repaired ”(There is one or more database tables not working. The database needs to be repaired), you need to fix the database error first.
Add the following code to the wp-config.php file. Usually it is right in the root directory.
Add it right before the “That’s all, stop editing! Happy blogging ”in wp-config.php.
first
define ('WP_ALLOW_REPAIR', true);
Once you've done the above, go to the Repair Database page by:
yoursite.com /wp-admin/maint/repair.php
wprepairdb
Its main purpose is to repair corrupted databases.
Remember to remove the above code from wp-config.php. After logging in Admin.
If this method does not fix the problem, or you encounter errors when fixing it, continue reading this article.
You may find another way to do this.
Oct 29th 2019 01:55