0

I want to see my customers listing in admin backend but here is this type of error

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento2.customer_grid_flat' doesn't exist, query was: SELECT COUNT(*) FROM customer_grid_flat AS main_table

And one thing more, When I run this command "php bin/magento setup:upgrade" for deploy the content then I am getting this error in the command prompt
"SQLSTATE[42000]: Syntax error or access violation: 1070 Too many key parts specified; max 16 parts allowed, query was: CREATE TABLE IF NOT EXISTS customer_grid_flat (
entity_id int UNSIGNED NOT NULL COMMENT 'Entity ID' ,
name text NULL COMMENT 'Name' ,
email varchar(255) NULL COMMENT 'Email' ,
group_id int NULL COMMENT 'Group_id' ,
created_at timestamp NULL default NULL COMMENT 'Created_at' ,
website_id int NULL COMMENT 'Website_id' ,
confirmation varchar(255) NULL COMMENT 'Confirmation' ,
created_in text NULL COMMENT 'Created_in' ,
dob date NULL COMMENT 'Dob' ,
gender int NULL COMMENT 'Gender' ,
taxvat varchar(255) NULL COMMENT 'Taxvat' ,
lock_expires timestamp NULL default NULL COMMENT 'Lock_expires' ,
aw_ca_business_name varchar(255) NULL COMMENT 'Aw_ca_business_name' ,
aw_ca_business_addr text NULL COMMENT 'Aw_ca_business_addr' ,
aw_ca_reseller_permitt varchar(255) NULL COMMENT 'Aw_ca_reseller_permitt' ,
aw_ca_contactnumber varchar(255) NULL COMMENT 'Aw_ca_contactnumber' ,
is_approved varchar(255) NULL COMMENT 'Is_approved' ,
shipping_full text NULL COMMENT 'Shipping_full' ,
billing_full text NULL COMMENT 'Billing_full' ,
billing_firstname varchar(255) NULL COMMENT 'Billing_firstname' ,
billing_lastname varchar(255) NULL COMMENT 'Billing_lastname' ,
billing_telephone varchar(255) NULL COMMENT 'Billing_telephone' ,
billing_postcode varchar(255) NULL COMMENT 'Billing_postcode' ,
billing_country_id varchar(255) NULL COMMENT 'Billing_country_id' ,
billing_region varchar(255) NULL COMMENT 'Billing_region' ,
billing_street varchar(255) NULL COMMENT 'Billing_street' ,
billing_city varchar(255) NULL COMMENT 'Billing_city' ,
billing_fax varchar(255) NULL COMMENT 'Billing_fax' ,
billing_vat_id varchar(255) NULL COMMENT 'Billing_vat_id' ,
billing_company varchar(255) NULL COMMENT 'Billing_company' ,
PRIMARY KEY (entity_id),
INDEX CUSTOMER_GRID_FLAT_GROUP_ID (group_id),
INDEX CUSTOMER_GRID_FLAT_CREATED_AT (created_at),
INDEX CUSTOMER_GRID_FLAT_WEBSITE_ID (website_id),
INDEX CUSTOMER_GRID_FLAT_CONFIRMATION (confirmation),
INDEX CUSTOMER_GRID_FLAT_DOB (dob),
INDEX CUSTOMER_GRID_FLAT_GENDER (gender),
INDEX CUSTOMER_GRID_FLAT_BILLING_COUNTRY_ID (billing_country_id),
FULLTEXT FTI_00A063FC834DF0A41CC9D8ACF8458ECB (name, email, created_in, taxvat, aw_ca_business_name, aw_ca_business_addr, aw_ca_contactnumber, shipping_full, billing_full, billing_firstname, billing_lastname, billing_telephone, billing_postcode, billing_region, billing_city, billing_fax, billing_company)
) COMMENT='customer_grid_flat' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci
"

For this, I have run php bin/magento indexer: reindex but it still showing this error. What should I do to resolve this error?

Information about My environment

Magento ver. 2.3.1

1
  • Does the table exist? Can you check if table customer_grid_flat exist in PhpMyAdmin?
    – Greg
    Oct 3, 2019 at 15:24

1 Answer 1

0
CREATE TABLE `customer_grid_flat` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `name` text DEFAULT NULL COMMENT 'Name',
  `email` varchar(255) DEFAULT NULL COMMENT 'Email',
  `group_id` int(11) DEFAULT NULL COMMENT 'Group_id',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created_at',
  `website_id` int(11) DEFAULT NULL COMMENT 'Website_id',
  `confirmation` varchar(255) DEFAULT NULL COMMENT 'Confirmation',
  `created_in` text DEFAULT NULL COMMENT 'Created_in',
  `dob` date DEFAULT NULL COMMENT 'Dob',
  `gender` int(11) DEFAULT NULL COMMENT 'Gender',
  `taxvat` varchar(255) DEFAULT NULL COMMENT 'Taxvat',
  `lock_expires` timestamp NULL DEFAULT NULL COMMENT 'Lock_expires',
  `shipping_full` text DEFAULT NULL COMMENT 'Shipping_full',
  `billing_full` text DEFAULT NULL COMMENT 'Billing_full',
  `billing_firstname` varchar(255) DEFAULT NULL COMMENT 'Billing_firstname',
  `billing_lastname` varchar(255) DEFAULT NULL COMMENT 'Billing_lastname',
  `billing_telephone` varchar(255) DEFAULT NULL COMMENT 'Billing_telephone',
  `billing_postcode` varchar(255) DEFAULT NULL COMMENT 'Billing_postcode',
  `billing_country_id` varchar(255) DEFAULT NULL COMMENT 'Billing_country_id',
  `billing_region` varchar(255) DEFAULT NULL COMMENT 'Billing_region',
  `billing_street` varchar(255) DEFAULT NULL COMMENT 'Billing_street',
  `billing_city` varchar(255) DEFAULT NULL COMMENT 'Billing_city',
  `billing_fax` varchar(255) DEFAULT NULL COMMENT 'Billing_fax',
  `billing_vat_id` varchar(255) DEFAULT NULL COMMENT 'Billing_vat_id',
  `billing_company` varchar(255) DEFAULT NULL COMMENT 'Billing_company',
  PRIMARY KEY (`entity_id`),
  KEY `CUSTOMER_GRID_FLAT_GROUP_ID` (`group_id`),
  KEY `CUSTOMER_GRID_FLAT_CREATED_AT` (`created_at`),
  KEY `CUSTOMER_GRID_FLAT_WEBSITE_ID` (`website_id`),
  KEY `CUSTOMER_GRID_FLAT_CONFIRMATION` (`confirmation`),
  KEY `CUSTOMER_GRID_FLAT_DOB` (`dob`),
  KEY `CUSTOMER_GRID_FLAT_GENDER` (`gender`),
  KEY `CUSTOMER_GRID_FLAT_BILLING_COUNTRY_ID` (`billing_country_id`),
  FULLTEXT KEY `FTI_8746F705702DD5F6D45B8C7CE7FE9F2F` (`name`,`email`,`created_in`,`taxvat`,`shipping_full`,`billing_full`,`billing_firstname`,`billing_lastname`,`billing_telephone`,`billing_postcode`,`billing_region`,`billing_city`,`billing_fax`,`billing_company`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='customer_grid_flat'

Your Answer

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

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