Hi Team,
I have change my database name(magento_demo to magentodemo). when I try open my store it throws me an error:
There has been an error processing your request
SQLSTATE[HY000] [1049] Unknown database 'magento_demo'
Error log record number: 1643579333
how to fix this error.
Solved! Go to Solution.
As you have changed your database name from magento_demo to magentodemo , same way you need to change this name into your env.php file
So go to your magento 2 root directory -> then app directory -> then etc directory -> over there you will find env.php file
In this env.php file , you will find below array parameters
array ( 'host' => 'localhost', 'dbname' => 'magento_demo', // you need to change your new name over here 'username' => 'root', 'password' => 'root', 'active' => '1', )
From here you need to change your database name with the new name !
You can also find this error from magento 2 root directory -> var directory -> report directory
Over there you will find file name - 1643579333
open this and check error log and post over here if issue is not solved !
but your issue will surely changed once you change your database name into the app/etc/env.php file
Hope it helps
Hello Harish,
Please follow below shared link:
https://magehit.com/blog/how-to-edit-magento-2-database-configuration-file/
Once you will configure env.php file please run the cache flush command and then enjoy your website
If still, you will face any issue let me know else please accept and click kudos. Thanks and cheers coding
Hello @harish_padala,
Please follow below steps
php bin/magento cache:clear php bin/magento cache:flush
If you still got an issue then let us know
--
If my answer is useful, please Accept as Solution & give Kudos
As you have changed your database name from magento_demo to magentodemo , same way you need to change this name into your env.php file
So go to your magento 2 root directory -> then app directory -> then etc directory -> over there you will find env.php file
In this env.php file , you will find below array parameters
array ( 'host' => 'localhost', 'dbname' => 'magento_demo', // you need to change your new name over here 'username' => 'root', 'password' => 'root', 'active' => '1', )
From here you need to change your database name with the new name !
You can also find this error from magento 2 root directory -> var directory -> report directory
Over there you will find file name - 1643579333
open this and check error log and post over here if issue is not solved !
but your issue will surely changed once you change your database name into the app/etc/env.php file
Hope it helps
Hello Harish,
Please follow below shared link:
https://magehit.com/blog/how-to-edit-magento-2-database-configuration-file/
Once you will configure env.php file please run the cache flush command and then enjoy your website
If still, you will face any issue let me know else please accept and click kudos. Thanks and cheers coding
Hello @harish_padala,
Please follow below steps
php bin/magento cache:clear php bin/magento cache:flush
If you still got an issue then let us know
--
If my answer is useful, please Accept as Solution & give Kudos