cancel
Showing results for 
Search instead for 
Did you mean: 

php bin/magento setup:upgrade SQL error

php bin/magento setup:upgrade SQL error

Hi all, hope you are doing well.

I was trying to run PHP bin/magento setup:upgrade command from the command line on my local dev environment on Windows 10 and to my surprise, I see this error.

php bin/magento setup:upgrade
Cache cleared successfully
File system cleanup:
C:/xampp/htdocs/m2/generated/code/Composer
C:/xampp/htdocs/m2/generated/code/Dotdigitalgroup
C:/xampp/htdocs/m2/generated/code/Klarna
C:/xampp/htdocs/m2/generated/code/MGS
C:/xampp/htdocs/m2/generated/code/MSP
C:/xampp/htdocs/m2/generated/code/Symfony
C:/xampp/htdocs/m2/generated/code/Yotpo
The directory 'C:/xampp/htdocs/m2/generated/metadata/' doesn't exist - skipping cleanup
C:/xampp/htdocs/m2/pub/static/adminhtml
C:/xampp/htdocs/m2/pub/static/deployed_version.txt
C:/xampp/htdocs/m2/var/view_preprocessed/pub
Updating modules:
Schema creation/updates:
SQLSTATE[HY000]: General error: 1036 Table 'C:\xampp\tmp\#sql11368_331_fd.MAI' is read only, query was: SELECT `COLUMNS`.`COLUMN_NAME` AS `name`, `COLUMNS`.`COLUMN_DEFAULT` AS `default`, `COLUMNS`.`DATA_TYPE` AS `type`, IF(IS_NULLABLE="YES", true, false) AS `nullable`, `COLUMNS`.`COLUMN_TYPE` AS `definition`, `COLUMNS`.`EXTRA` AS `extra`, IF(COLUMN_COMMENT="", NULL, COLUMN_COMMENT) AS `comment` FROM `information_schema`.`COLUMNS` WHERE (TABLE_SCHEMA = 'm2') AND (TABLE_NAME = 'catalog_product_bundle_price_index') ORDER BY `ORDINAL_POSITION` ASC

I have researched all over the place but could not find any result.

Any help is highly appreciated. Thanks in advance and have a good day.

1 REPLY 1

Re: php bin/magento setup:upgrade SQL error

@pmcshivamg8dc1 ,

kindly check your folder permission for 

C:\xampp\tmp\

this should be writable with Everyone's user. 

 

kindly Accept as a Solution if this works for you and give Kudos Smiley Happy