pdo_mysql extension is not installed
PHP Mysql Error: pdo_mysql extension is not installed.
Magento needs PDO Mysql extension for database connection and related things, so if you don’t have pdo_mysql extension enabled Magento will complain about this and will not proceed further installation. If you are not sure what PDO is, it’s high time for you to look at http://php.net/manual/en/ref.pdo-mysql.php
Coming back to error, to resolve this you will need to edit your php.ini file where it says:
;extension=pdo_mysql.so
Just uncomment the line by removing front semincolon, so it becomes
extension=pdo_mysql.so
Save it and restart the server, the error should go.
If you are on Windows, then that line should read:
extension=php_pdo_mysql.dll
If you don’t find pdo_mysql in php.ini, install php5-mysql by running the command:
sudo apt-get install php5-mysql (on Ubuntu)
sudo yum install php-mysql (on Redhat, Fedora, CentOS)
7 Comments
Leave a comment to Jayden
Welcome to my Blog
Certifications
Honor
Recognition
Contributions
Categories
- Apache (2)
- ChatGPT (1)
- Domain name (2)
- eCommerce (2)
- htaccess (1)
- Humor (3)
- Instagram API (1)
- jQuery (4)
- JSON (1)
- Linux (10)
- Magento (142)
- Magento admin (58)
- Magento Certification (5)
- Magento error (13)
- Magento frontend (68)
- Magento Imagine (2)
- Magento Interview (5)
- Magento Master (2)
- Magento2 (10)
- Mobile (1)
- MySQL (7)
- OpenAI (1)
- OroCRM (2)
- Performance (2)
- PHP (8)
- Prototype JS (3)
- Security (4)
- Wordpress (3)
- XML (2)
hello kalpesh,
i am magento developer. i am not working t-shirt design module. you are working t-shirt design module…share your customization tutorials in this blog….i am your best friends
Thanks but the line:
;extension=pdo_mysql.so
Does not exist in php.ini. I’m using the sample php.ini file created by Magento.
Awesome! Worked when using Amazon EC2 to connect to Amazon RDS hosted DB. 🙂
Thank you for the short and sweet solution! 🙂
Email me if you want to do some work together in California!
Hello Kalpesh,
I need to tell to you that I have these lines in my php.ini
[Pdo_mysql]
; If mysqlnd is used: Number of cache slots for the internal result set cache
; http://php.net/pdo_mysql.cache_size
pdo_mysql.cache_size=2000
; Default socket name for local MySQL connects. If empty, uses the built-in
; MySQL defaults.
; http://php.net/pdo_mysql.default-socket
pdo_mysql.default_socket=
extension=php_pdo_mysql.dll
but not pdo_mysql.so as you are telling. What should I do?
Thanks 🙂
Hi, on a windows server PHP extensions ends in dll, so you are good with that. Check if PDO Mysql is showing in phpinfo(); output to make sure it’s working. You can also see which extensions are loaded with get_loaded_extensions function.
Hello
I have a problem with Magento 2.1.5.
Hosting is unfortunately not available through ssh.
However, phpinfo () informs that the module is installed.
How to fix it?
Thank you
Thanks Bro Its very help full for me