Unable to install magento automatic docker setup 2.4.8 SQL Error
Please help me to resolve this SQL error
In Mysql.php line 700:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.catalogi
nventory_stock_cl' doesn't exist, query was: SHOW CREATE TABLE cataloginve ntory_stock_cl
In Mysql.php line 109:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.catalogi
nventory_stock_cl' doesn't exist, query was: SHOW CREATE TABLE cataloginve ntory_stock_cl
In Mysql.php line 90:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento.catalogi
nventory_stock_cl' doesn't exist
This error usually happens when the Magento installer can't create all required tables, often due to leftover data from previous installs, missing environment files, or a Magento core issue. The docker-magento setup doesn't customize table creation—it relies on Magento's own scripts—so this is not specific to the Docker setup itself.
To resolve this, make sure all required environment files (like magento.env) are present in your env directory. Then, remove all Docker containers and persistent volumes for your project to ensure a clean database state, and try the installation again. Cleaning up old data and starting fresh has resolved similar issues for others. If the problem persists, try a different Magento version to see if it's version-specific, and check the install logs for earlier errors that might explain why the table wasn't created. More details and similar cases are discussed here and here.
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other
dependency failed to start: container 248p1-opensearch-1 is unhealthy
@gander please check
I haven't used Magneto for at least three years, so I don't remember what the problem is anymore.
Just had this on my local install (unrelated to docker-magento). It happened when I had an existing Magento 2.4.8-p3 install, and tried to reinstall by running this:
bin/magento setup:install \
--cleanup-database \
--base-url=https://m248p3.test \
--backend-frontname=admin \
--db-host=localhost \
--db-user=root \
--db-password=root \
--db-name=m248p3 \
--admin-firstname=admin \
--admin-lastname=admin \
[email protected] \
--admin-user=admin \
--admin-password=admin123 \
--language=en_US \
--currency=EUR \
--timezone=Europe/Zagreb \
--use-rewrites=1 \
--search-engine=opensearch \
--use-secure=1 \
--use-secure-admin=1
I fixed it by doing rm -rf app/etc/env.php and then re-running the command. Not sure how and if that helps debugging your issues.