Skip to main content
replaced http://magento.stackexchange.com/ with https://magento.stackexchange.com/
Source Link

Try to replace localhost to 127.0.0.1 and check

This is commonly caused by a different instance of PHP being used by the PHP command line compared to the web server. In particular, mysql.sock might be misconfigured.

Refer this magento devdocs link http://devdocs.magento.com/guides/v2.0/install-gde/trouble/php/tshoot_phpini.html

You can also refer - PDO Exception error on indexPDO Exception error on index

It will works

Try to replace localhost to 127.0.0.1 and check

This is commonly caused by a different instance of PHP being used by the PHP command line compared to the web server. In particular, mysql.sock might be misconfigured.

Refer this magento devdocs link http://devdocs.magento.com/guides/v2.0/install-gde/trouble/php/tshoot_phpini.html

You can also refer - PDO Exception error on index

It will works

Try to replace localhost to 127.0.0.1 and check

This is commonly caused by a different instance of PHP being used by the PHP command line compared to the web server. In particular, mysql.sock might be misconfigured.

Refer this magento devdocs link http://devdocs.magento.com/guides/v2.0/install-gde/trouble/php/tshoot_phpini.html

You can also refer - PDO Exception error on index

It will works

changes in body formation
Source Link
Manthan Dave
  • 9.9k
  • 2
  • 33
  • 54

Try to replace localhost to 127.0.0.1 and check

This is commonly caused by a different instance of PHP being used by the PHP command line compared to the web server. In particular, mysql.sock might be misconfigured.

Refer this magento devdocs link http://devdocs.magento.com/guides/v2.0/install-gde/trouble/php/tshoot_phpini.html

You can also refer - PDO Exception error on index

It will works

This is commonly caused by a different instance of PHP being used by the PHP command line compared to the web server. In particular, mysql.sock might be misconfigured.

Refer this magento devdocs link http://devdocs.magento.com/guides/v2.0/install-gde/trouble/php/tshoot_phpini.html

You can also refer - PDO Exception error on index

It will works

Try to replace localhost to 127.0.0.1 and check

This is commonly caused by a different instance of PHP being used by the PHP command line compared to the web server. In particular, mysql.sock might be misconfigured.

Refer this magento devdocs link http://devdocs.magento.com/guides/v2.0/install-gde/trouble/php/tshoot_phpini.html

You can also refer - PDO Exception error on index

It will works

Source Link
Manthan Dave
  • 9.9k
  • 2
  • 33
  • 54

This is commonly caused by a different instance of PHP being used by the PHP command line compared to the web server. In particular, mysql.sock might be misconfigured.

Refer this magento devdocs link http://devdocs.magento.com/guides/v2.0/install-gde/trouble/php/tshoot_phpini.html

You can also refer - PDO Exception error on index

It will works