I started getting this error suddenly and I checked and the table does exist. I'm not sure how to start fixing this issue. I have attached a picture below:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento_e.catalog_category_flat_store_1' doesn't exist, query was: SELECT
main_table
.entity_id
, main_table.name
, main_table.path
,main_table
.is_active
,main_table
.is_anchor
,url_rewrite
.request_path
FROMcatalog_category_flat_store_1
ASmain_table
LEFT JOINurl_rewrite
ON url_rewrite.entity_id = main_table.entity_id AND url_rewrite.is_autogenerated = 1 AND url_rewrite.store_id = 1 AND url_rewrite.entity_type = 'category' WHERE (main_table.is_active = 1) AND (main_table.path like '1/2/15/%') AND (level
<= 3) ORDER BYmain_table
.position
ASC
php bin/magento indexer:reindex
working fine?SET SQL_SAFE_UPDATES = 0; update indexer_state set status = 'invalid' where status != 'valid';
& after that run thi commandphp bin/magento indexer:reindex customer_grid