How-to Enable the PHP 5 Apache MySQL Extensions on Ubuntu Linux Easy Guide

June 19, 2014 | By thelinuxevangelist | Filed in: Tutorial.

Enabling PHP MySQL Extensions on Apache for Ubuntu 14.04 Trusty

The Tutorial Shows You Step-by-Step How-to Install and Enable the PHP 5 Apache 2 MySQL Extensions on Ubuntu 14.04 Trusty Tahr LTS i386/amd64 Linux Server/Desktop.

The PHP MySQL Extension dispose of 3 API’s:

  • mysql
  • mysqli

It is recommended to use either the mysqli or PDO_MySQL extensions. It is not recommended to use the old mysql extension for new development, as it has been deprecated as of PHP 5.5.0 and will be removed in the future.

The mysqli, PDO_MySQL and mysql PHP extensions are lightweight wrappers on top of a C client library.

Enabling the PHP 5 MySQL Extension Ubuntu - Featured
  1. Login into Server Shell

    Or Open a Command Line Terminal Window
    (Press “Enter” to Execute Commands)

    Enabling the PHP 5 MySQL Extension Ubuntu - Open Terminal
  2. How-to Install the PHP 5 MySQL Extension

    Install MySQL Extension for Ubuntu
  3. How-to Install Netbeans IDE for PHP Development on Ubuntu:

    Install Netbeans PHP IDE for Ubuntu
  4. Enabling the PHP5 Apache MySQL Extensions

    sudo su -c "nano /etc/php5/apache2/php.ini"


    • For mysql Extension:
    • For mysqli Extension:
    • For PDO_MySQL Extension:

    Ctrl+x to Save & Exit from nano Editor :)

  5. Install Aptana Studio 3 IDE for Html5, Javascript, CSS, PHP:

    Install Aptana Studio3 for Ubuntu
  6. Restart the Apache Web Server

    sudo su -c "service apache2 restart"

Tags: , , , , , , , , , , , , , , , , , , ,