skip to Main Content

As a magento newby I have installed magento 2.1.8. After the install I get an error in the admin saying that one or more indexers are invalid, so I have found some help online showing how to reindex, but when I use these commandlines I get errors back saying…

php bin/magento index:reindex 

[Zend_Db_Adapter_Exception]                       
SQLSTATE[HY000] [2002] No such file or directory   

[PDOException]                                    
SQLSTATE[HY000] [2002] No such file or directory  

Install is on localhost -> MAMP.

2

Answers


  1. This error occur when you remove store or website not properly. Check the store_group and store_website table and compare the entry with Content -> Configurations in Magento admin. Remove additional entry from database. I had personally used it and its work fine.

    Login or Signup to reply.
  2. The “SQLSTATE[HY000] [2002]” error is usually related to the MySQL DB being down and/or Magento being unable to connect to it.

    Before

    MySql Server Stopped

    SQLSTATE <HY000> [2002]

    After

    MySql server Restarted

    Site Is Operational

    Please check if:
    (a) Your MySQL instance is up and running.
    (b) The user account, your Magento instance is setup to use, can connect to the MySQL DB and also has sufficient grants/privileges to access the Magento DB tables.

    P.S: When you say you’ve installed Magento, I’m assuming you cloned the github repo and ran through the appropriate Magento setup/install steps … Correct?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search