Tuesday, April 13, 2021
Home Technology Programming Solved : Magento pdo_mysql extension is not installed

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
extension=pdo_mysql.so
extension=pdo_mysqli.so
extension=pdo.so
; 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
extension=mcrypt.so
; 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.

Most Popular

Top Gift Ideas To Celebrate This Christmas Day With Your Family

Christmas is celebrated every year on the 25th of December. It brings joy and cheers to our life. People celebrate Christmas to...

KBC Question Categories 2020

Kaun Banega Crorepati is one of the most popular t.v game shows in India. The show takes its inspiration from the British...

TheWiSpy Review – Best Phone Tracking App

TheWiSpy tracker program is not different from many other utility programs on your cell phone, only that it comes with spying capabilities....

MY DICTIONARY PROJECT

I have started a new project called the Indic Dictionary. This will cover popular household words in India and what they are called in various languages. Eventually, I will make this an easy to use app where where people can easily find something like “hing in English” or “Tea Tree Oil in Hindi” or “carrom seeds in Urdu”.