cancel
Showing results for 
Search instead for 
Did you mean: 

There has been an error processing your request

SOLVED

There has been an error processing your request

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.

 

 

3 ACCEPTED SOLUTIONS

Accepted Solutions

Re: There has been an error processing your request

Hi @harish_padala

 

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 

if issue solved,Click Kudos & Accept as Solution

View solution in original post

Re: There has been an error processing your request

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 Smiley Happy

 

If still, you will face any issue let me know else please accept and click kudos. Thanks and cheers coding

Manish Mittal
https://www.manishmittal.com/

View solution in original post

Re: There has been an error processing your request

Hello @harish_padala,

 

Please follow below steps

  1. Open this file app/etc/env.php and Update database name on this db->connection->dbname node which is created for store
  2. Open a terminal and run below command to clear cache
    php bin/magento cache:clear
    php bin/magento cache:flush
  3. Done!

If you still got an issue then let us know

 

--
If my answer is useful, please Accept as Solution & give Kudos

View solution in original post

3 REPLIES 3

Re: There has been an error processing your request

Hi @harish_padala

 

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 

if issue solved,Click Kudos & Accept as Solution

Re: There has been an error processing your request

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 Smiley Happy

 

If still, you will face any issue let me know else please accept and click kudos. Thanks and cheers coding

Manish Mittal
https://www.manishmittal.com/

Re: There has been an error processing your request

Hello @harish_padala,

 

Please follow below steps

  1. Open this file app/etc/env.php and Update database name on this db->connection->dbname node which is created for store
  2. Open a terminal and run below command to clear cache
    php bin/magento cache:clear
    php bin/magento cache:flush
  3. Done!

If you still got an issue then let us know

 

--
If my answer is useful, please Accept as Solution & give Kudos