I am trying to migrate my Magento 1 to 2 and for that I want to create some complete startup scripts to completely start over. Installing Magento2 using the web works fine, but when I try to run this command:

bin/magento setup:uninstall

bin/magento setup:install --db-host localhost --db-name m2 
    --db-user magento --db-password ******* --db-prefix exa_ 
    --base-url http://m2.example.com:2000/ --language en_US 
    --timezone Europe/Amsterdam --currency EUR --admin-user bart 
    --admin-password ******** --admin-email [email protected] 
    --admin-firstname Bart --admin-lastname Friederichs 
    --backend-frontname admin_exa

It gives me this error:

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'm2.exa_store_website' doesn't exist  
  , query was: SELECT `exa_store_website`.* FROM `exa_store_website`  

Am I missing something?

  • Are any 3rd party modules present that add console commands?
    – Pmclain
    Jan 13, 2018 at 6:25

2 Answers 2


I think the error code answers itself.

Table 'm2.exa_store_website' doesn't exist
  • I see that yes, but I haven't created that table myself. I uninstall en re-install, shouldn't that 'just work' ? I added --cleanup-database to my command and it seems to work now though .... Jan 12, 2018 at 14:51

Don't know exactly what was wrong, but adding --clean-database fixed it.

  • You mean: --cleanup-database
    – alexblum
    May 16, 2019 at 6:02

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.