magento pdo mysql error

Solved : Magento pdo_mysql extension is not installed

If you encounter something like this in your Magento store setup, then here is the solution to your problem.

Solved : Magento pdo_mysql extension is not installed

magento pdo mysql error

Reason for this PDO Mysql adapter issue

  1. Either you do not have this server extension installed
  2. Or some mis-configuration in your server settings (like php.ini) is causing this.

In most cases, when you have a shared server like godaddy, bluehost, hostgator or inmostion hosting and you have installed magento such a server you do not have access to the global PHP.INI
This is the file that is accountable for most of the server settings.
But you can create a local php.ini file to override the settings in the global file. To do this, copy any sample of php.ini that you may have. Get rid of all the settings and focus only on the basic stuff. e.g I have used this. You can copy it too as long as other setting do not mess up with your settings.

Solution to PDO Mysql adapter problem

; This file is for CGI/FastCGI installations.
; Try copying it to php5.ini, if it doesn't work
; adjust memory limit
memory_limit = 100M
max_execution_time = 24000
; disable magic quotes for php request vars
magic_quotes_gpc = off
; disable automatic session start
; before autoload was initialized
flag session.auto_start = off
; enable resulting html compression
zlib.output_compression = on
; disable user agent verification to not break multiple image upload
suhosin.session.cryptua = off
; turn off compatibility with PHP4 when dealing with objects
zend.ze1_compatibility_mode = off
; PHP for some reason ignores this setting in system php.ini 
; and disables mcrypt if this line is missing in local php.ini
; Disable PHP errors, notices and warnings output in production mode to prevent exposing sensitive information.
display_errors = Off

Note the part highlighted in red. Those are the ones you need. Add it to your local php.ini and you are good to go.

What to do if this does not work.

Well, this is what worked for a majority of people who had this issue. If you are on a windows server the equivalent for these.
If you have a managed host, try to re-install these services. Unfortunately I have no expertise on shell commands to help you there.

More posts you might be interested in: