Not able to enable pdo_mysql extension or not able to install

10,775

Solution 1

sudo apt-get install php-pdo-mysql

Solution 2

Thanks for your help, i have resolved issue.

I have executed below commands in terminal.

sudo a2dismod php7.0
sudo a2enmod php5.6
sudo apt-get install php5.6-mysql
sudo service apache2 restart

Thanks,

Share:
10,775

Related videos on Youtube

shyam
Author by

shyam

I Am magento developer with 2 year of experiance

Updated on September 18, 2022

Comments

  • shyam
    shyam over 1 year

    I am using Ubuntu 16.04.3 LTS , Using PHP version 5.6 i have required 5.6 version only not required php latest version

    I tried to install or tried to enable but not working:

     sudo apt-get install php5-gd php5-mysql
    
    E: Package 'php5-mysql' has no installation candidate
    

    I am getting below error.

    pdo_mysql extension is not installed
    
    • George Udosen
      George Udosen over 6 years
      Which is it php5-mysql or pdo_mysql?
  • shyam
    shyam over 6 years
    Already installed and done downgrade sudo a2dismod php7.0 sudo a2enmod php5.6 sudo service apache2 restart
  • Alex Austin
    Alex Austin over 6 years
    did you do apt update?
  • shyam
    shyam over 6 years
    Hi Vichu, Not working tried change the cd /etc/php/5.6/apache2 nano php.ini but not working
  • Alex Austin
    Alex Austin over 6 years
    what is the output of php -m?
  • shyam
    shyam over 6 years
    Alex, Here is output calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv json libxml mbstring mcrypt mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix readline Reflection session shmop SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl Zend OPcache zlib
  • Alex Austin
    Alex Austin over 6 years
    have you tried apt-get install pdo-mysql?
  • damadam
    damadam over 4 years
    Can you provide more explanation about what is php-pdo-mysqlpackage? for example, what contains that package, ...