/app/etc/env.php --- 'localhost' vs ''

I changed localhost to however my Magento frontend and backend broke after that.

    'db' => [
    'table_prefix' => '',
    'connection' => [
        'default' => [
            'host' => 'localhost',
            'dbname' => 'shop',
            'username' => 'shop',
            'password' => '1234567',
            'active' => '1'

came to know from server that somehow mysql crashed, and they had to work on mysql conf files to recover. i am still unable to understand what went wrong??



Open core_config_data table in database

web/unsecure/base_url =>
web/secure/base_url = >

see attched image

enter image description here

Then run command in terminal/putty

php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento indexer:reindex
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f
  • my core_config_data says - web/unsecure/base_url - luxeron.in/pro and web/secure/base_url - luxeron.in/pro, – Nittn Warshne Sep 13 at 18:18
  • @NittnWarshne okay, frontend is working fine. what's the problem? – Savan Patel Sep 14 at 5:09
  • thanks @savanpatel, however --- nittn.com systemd[1]: mysqld.service failed., and my web server support helped "We rectified the issue by adding 'innodb_force_recovery = 1' in /usr/local/apps/mysql56/etc/my.cnf file located on your server. Once added, we restarted MySQL service and now MySQL is working fine." why the website broke is still a mystery?? – Nittn Warshne Sep 14 at 7:42
  • 1
    reference link => stackoverflow.com/questions/7382602/… – Savan Patel Sep 14 at 8:54
  • thanks @savanpatel – Nittn Warshne Sep 14 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.