Tuesday, May 1, 2012

CentOS / RHEL: Install MySQL PHP Extension

How do I install a module or extension for PHP applications that use MySQL databases under CentOS / Redhat / RHEL / Fedora Linux?

You need to install php-mysql module using the yum command which contains a dynamic shared object that will add MySQL database support to PHP. MySQL is an object-relational database management system. PHP is an HTML-embeddable scripting language. If you need MySQL support for PHP applications, you will need to install this package and the php package:
# yum install php php-mysql httpd
Finally, restart apache web server:
# service httpd restart

No comments:

Post a Comment