MySQL Support in PHP5 how to enable Ubuntu

If you want to enable MySQL support in PHP5 in Ubuntu follow along…

SSH into your server and type this:

dpkg-query -l > packages.txt
View your newly created file "packages.txt" in your favorite editor, I like to use an FTP server then move it to my local computer for easer viewing. Look for "php4-mysql" and "php5-mysql" assuming your setup was like mine you are missing php5-mysql.

So lets install it with:

apt-get install php5-mysql

Edit your php.ini file at /etc/php5/apache2/php.ini
Look for

and change it to

notice no ; in the above thus enabling it.

Log into Virtualmin and relaunch Apache, I had to REBOOT my machine for the changes to take effect.

In your apache root directory drop this phpinfo.php file in




Then view the above at http://yourdomain/phpinfo.php and look for mysql in the list.