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

1 Answer 1


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. Commented Apr 4, 2019 at 12:25
  • Can you post its screenshot: "When we doing reindex it's display table already existing"? Commented Apr 4, 2019 at 12:40
  • You can see here prnt.sc/n7fee4 Commented Apr 4, 2019 at 13:01
  • Have you created the table manually? Commented Apr 4, 2019 at 13:44
  • Ya. Still it's not create Commented Apr 5, 2019 at 4:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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