Magento 2: Admin Customer Listing Not Displaying Record
I will NOT recommend to mess with Magento database directly.
Try this:
php bin/magento indexer:reset customer_grid
php bin/magento indexer:reindex customer_grid
Reset your databse: Magento 2: Not showing customers in backend grid
update indexer_state set status = 'invalid' where status != 'valid';
[EDIT]:
We should use
php bin/magento indexer:reset customer_grid
Possible errors:
--Disable safe mode
update magento.indexer_state set status = 'invalid' where status != 'valid' Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column To disable safe mode, toggle the option in Preferences -> SQL Editor and reconnect. 0.000 sec
Reference here: https://stackoverflow.com/questions/11448068/mysql-error-code-1175-during-update-in-mysql-workbench
--Not able to run php bin/magento indexer:reindex customer_grid
Customer Grid index is locked by another reindex process. Skipping.
show processlist;
kill "id number";
Or, we can restart mysql server.
--A large number of database - php -dmemory_limit=512M
If you have a large number of database, run the command with
php -dmemory_limit=512M bin/magento indexer:reindex customer_grid
Or should increase the memory_limit
~ 512M in php.ini