1
rpm -e --nodeps mysql-libs 
yum install MariaDB-server

The above command helped me to install mariadb, also installed Wordpress. This was a great help. My problem now is when I reboot the server or restart apache here is the error:

"Your PHP installation appears to be missing the MySQL extension which is required by WordPress."

How can I solve this problem?

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109

2 Answers2

1

You need to install php-mysql so that PHP could connect to a MySQL/MariaDB instance. Do this by

yum install php-mysql
Uwe L. Korn
  • 224
  • 1
  • 14
  • I install mariadb without erasing php_mysql and mysql libs. actually I already installed wordpress and create a site but when I restart the httpd the error occurs – Albert Estillore Oct 30 '12 at 10:19
  • is this a bug for combining php, mariadb, apache and wordpress. here is my situation: I have a server running with php and mysql, for me to install the mariadb you need to remove mysql-server. yum remove mysql-server after removing mysql-server I run this rpm -e --nodeps mysql-libs To prevent php_mysql and mysql libs from deletion/conflicts during installation of mariadb after that I successfully insyall mariadb and able to install wordpress but if I restart the appache the error occured “Your PHP installation appears to be missing the MySQL extension which is required by WordPress.” – Albert Estillore Oct 30 '12 at 10:26
0

My solution was to reinstall php and php related packages.

yum remove php*
yum install epel-release

You must find the packages for your specific php version. In this example it's PHP 5.6

yum install php56w php56w-common

You may want as well to reinstall other packages depending on your requirements; listing a few here:

yum install php56w-mysqlnd php56w-pdo php56w-opcache php56w-mbstring php56w-gd php56w-dom php56w-pear php56w-soap

For example you can find a list of packages for PHP 5.6 here https://webtatic.com/packages/php56/#sapis ; or list available packages using yum list available 'php56w-*'

Restart your server: systemctl restart httpd.service

Alex P.
  • 101
  • 3