I am using Magento 2.2.6. My site is working fine. But today morning I show customer_grid_flat table delete in my database.

Please, someone, let me know why it's doing.

Also in Admin side customer page display SQL error


You need to export this table from any other Magento of the same version. Then import it into your Magento's database.

After doing so, you need to truncate the table and then do the reindex by using the following command:

php bin/magento indexer:reindex customer_grid

Update: There is no need to import the table manually. When we reindex using the above command, Magento auto creates the table and refills the data.

Please let me know if it helps.

  • When we doing reindex it's display table already existing but actually in db table is not display. – Sweety Masmiya Apr 4 '19 at 12:25
  • Can you post its screenshot: "When we doing reindex it's display table already existing"? – Mohit Kumar Arora Apr 4 '19 at 12:40
  • You can see here prnt.sc/n7fee4 – Sweety Masmiya Apr 4 '19 at 13:01
  • Have you created the table manually? – Mohit Kumar Arora Apr 4 '19 at 13:44
  • Ya. Still it's not create – Sweety Masmiya Apr 5 '19 at 4:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.