Hi All, relative new to Magento. Currently I am trying to register a custom module and running;
php bin/magento setup:upgrade
However I am getting the error SQLSTATE[42S02]: Base table or view not found: 1146 Table 'magento2.core_config_data' doesn't exist, query was: SELECT `main_table`.* FROM `core_config_data` AS `main_table`
I believe it maybe because I am have a Brew MySQL installed and a MAMP MySQL installed.
FYI; I installed Magento2 within MAMP, on a MacOS, I have checked the table/database on the env.php file and via phpmyadmin and it all seems correct.
Hello @jchan1993h4a40
I think there is some miss match between your MAMP and Brew Mysql.
You can find out like this
> Open Terminal
> Run below command
mysql -uroot -p (Press Enter) asking you password of the mysql .Please add it and press enter
> show databases;
If everything okay then please remove anyone mysql.
If my answer is useful, please Accept as Solution & give Kudos
Hi, thanks for this. However I only have one MySQL when I run that command - is this right?
if you have one than Please make sure to check credential
@anantprajapati Weird, I have checked the credentials - which is the right credentials for the database I need within MAMP/PHPmyadmin. However, when I run bin/magento setup:upgrade, this is detecting the database within brew (as it has no tables but also when I delete it then it does not find it).
Hello @jchan1993h4a40
Can you please check this thread. May be it will useful for you.
I think you should use the port number with the host.
If my answer is useful, please Accept as Solution & give Kudos
Hello @jchan1993h4a40
Please check on database first if the table exists and we can add prefix for all tables of Magento for more integrity, check env.php there must be some pre-fix added because you're not facing any issue with Magento running, right ?
so the new module doesn't know about this and maybe using the table name without prefix.
if so, please contact your Developers or Support team of module to correct query.