Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install SpaceBukkit. I was wondering how I enable pdo_mysql. When trying to setup the MySQL part I get this error:

The "pdo_mysql" extension is NOT loaded in your `php.ini`! 
Make sure to load it before continuing!

This is not a cPanel server, so I can only rely off of ssh and ftp (sftp). If you guys could please let me know it would be greatly appreciated!

As a side note, I am on Centos 5.

share|improve this question

Install pdo:

yum install php-devel php-pear mysql-devel httpd-devel
pecl install pdo
PHP_PDO_SHARED=1 pecl install pdo_mysql

Then edit the /etc/php.ini file with your favorite commandline texteditor (vi, vim, nano,...) (access the machine through ssh) and add these lines:

Restart the webserver and you should be all set. Cudos to

share|improve this answer
Where do I add the: Where in the file? – hvalner Jan 22 '13 at 23:36
at the end or wherever extension is defined. – Lucas Kauffman Jan 23 '13 at 8:06
What do you mean wherever the extension is defined? – hvalner Jan 24 '13 at 7:21
Have you even tried opening the php.ini file? – Lucas Kauffman Jan 24 '13 at 7:32
Yea I have. Just I don't know where to add it. Sorry bout that. – hvalner Jan 25 '13 at 6:29

I was also facing this issue, the problem for me was a missing php to mysql library. In CentOs I fixed it by running # yum install php-mysql and then restarting apache with # /bin/systemctl restart httpd.service Note that the naming is slightly different from debian/ubuntu based distros, php->php5 and httpd->apache2.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.