Online Chat
 Call Us: 
1-877-744-1221
Browse Submit a Ticket
 
Advanced Search
Tools
Rss Categories

PHP drivers for MySQL (Linux)

Author: Edward Hardin Reference Number: AA-00717 Views: 5156 Last Updated: 05/30/2012 05:03 PM 0 Rating/ Voters

You can use either mysqli or pdo_mysql PHP extension for connecting to the MySQL server. The instructions are simple, as follows.

Recommendation

We strongly recommend to use mysqli extension because pdo_mysql has some unresolved issues at the moment.

mysqli

The php_mysqli.so extension must be enabled inside of php.ini. In order to do this you need to find the php.ini file (typically located in /etc/php5/cgi/), and make sure you remove the comment (semi-colon) from the start of the line:

extension=mysqli.so

Then you need to save the php.ini and restart the Apache.

pdo_mysql

PDO and PDO MySQL extensions must be enabled inside of php.ini. In order to do this you need to find the php.ini file (typically located in /etc/php5/cgi/), and make sure you remove the comment (semi-colon) from the start of the line:

extension=pdo.so

extension=pdo_mysql.so

Then you need to save the php.ini and restart the Apache.