Jump to content

BackOffice http error 500 and connection denied by mysql


Recommended Posts

Hello,

I have two issues after migrating. I am opening a separate topic for each, to simplify the discussion.

In this issue, connecting to the back office with debug mode off (_PS_MODE_DEV_ false in config/define.inc.php) will result in a http 500 error.

In the apache error log there is, indeed, a stack entry where it shows the user and password still being the one of the original installation, not the new migrated one.

[Tue Dec 17 13:07:21.048002 2019] [:error] [pid 7604:tid 2016] [client ::1:58362] PHP Fatal error:  Uncaught PDOException: SQLSTATE[HY000] [1045] Access denied for user 'old_user'@'localhost' (using password: YES) in D:\\xampp\\htdocs\\PS\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php:43\nStack trace:\n#0 D:\\xampp\\htdocs\\PS\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOConnection.php(43): PDO->__construct('mysql:host=127....', 'old_user', 'xxxx', Array)\n#1 D:\\xampp\\htdocs\\PS\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\PDOMySql\\Driver.php(44): Doctrine\\DBAL\\Driver\\PDOConnection->__construct('mysql:host=127....', 'old_user', 'xxxx', Array)\n#2 D:\\xampp\\htdocs\\PS\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Connection.php(360): Doctrine\\DBAL\\Driver\\PDOMySql\\Driver->connect(Array, 'old_user', 'xxxx', Array)\n#3 D:\\xampp\\htdocs\\PS\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Connection.php(942): Doctrine\\DBAL\\Connection->connect()\n#4 D:\\xampp\\htdocs\\PS\\src\\PrestaShopBundle\\Kernel\\ModuleRepository.php(59): Doctrine\\DBAL\\Connection->query('SELECT name FRO...')\n#5 D:\\xampp\\htdocs\\PS\\src\\Prest in D:\\xampp\\htdocs\\PS\\vendor\\doctrine\\dbal\\lib\\Doctrine\\DBAL\\Driver\\AbstractMySQLDriver.php on line 103


However: if I set debug mode on in define.inc.php, it connects without any problem.

Things I have done after migrating:

  • updated ps_configuration with the new PS_SHOP_DOMAIN, PS_SHOP_DOMAIN_SSL, PS_SHOP_NAME, PS_SSL_ENABLED_EVERYWHERE
  • updated ps_shop_url with the new domain for domain, domain_ssl, physical_uri
  • updated ps_shop with the new name
  • updated the file app/config/parameter.php with the new database name, location, user and password
  • regenerated /htaccess
  • ensured that php.ini has all the limits and timers as required and verified with phppsinfo.php: all green.

Finally, the environment the store has been migrated from is a linux, while the new environment is on windows, with php any MySQL versions matching.

Does anyone have some idea where prestashop is taking the username from, when attempting to connect to the back office?

Edited by Flaviotti (see edit history)
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...