Skip navigation.
Home
Free Online Computer Help Community

Question: How do I install the PEAR module PDO_MYSQL in SSH/Shell?

Computer Help's picture

How to setup PDO_MYSQL while using Linux/SSH/Shell.

I have used these following instructions to successfully install PDO_MYSQL on a shared CentOS 5 server.

To install the PEAR module pdo_mysql do the following ->

1.) To end any confusion start at root. Type: cd /root in your SSH/Shell prompt.
2.) Now Type: install pear PDO_MYSQL
2.A)If it says 'permission denied' to some degree, perform the following to get permission ->

Run these commands in this order if needed because of permission issues.
mkdir /root/tmp.pear
mkdir /root/tmp.pear-build-root
rm -rf /tmp/pear*
ln -s /root/tmp.pear /tmp/pear
ln -s /root/tmp.pear-build-root /tmp/pear-build-root

3.) Once you have completed this and made it this far, make sure you add:

extension=pdo.so
extension=pdo_mysql.so

To the appropriate extension area for php.ini. (search for 'extension' and find the title of something like 'windows' (CTRL + W In Nano/Pico) add the (2) commands below the commented out command modules.

4.) Save new lines of code to file. (CTRL + X) then "y" usually.
5.) Restart Apache. Type: service httpd restart

Questions and concerns can be addressed in the comments section at the bottom of this blog page.