Friday, September 30, 2022
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 10 Coding Competitions for Kids: Junior Coding Championships worldwide

If your child has been into coding and app development recently and you wish to show off their coding skills then enrol...

Turn on Less Secure Apps in Google Workspace Gmail accounts

Sometimes a developer needs to send emails from Gmail or Google Workspace email account or mail server from their website or app....

Construction Financing: Everything You Need to Know

Thinking about building a new home? Construction financing can help. In this article, we will help you figure out...

Set Shipping Rules on Wix

We understand that working on wix control panel can be a little overwhelming to beginners. Despite having 12 years of experience in...

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”.