ZiBiahar Posted May 23, 2023 Share Posted May 23, 2023 (edited) ISSUE SAME AS TITLE, Im still keep getting ERROR 500: Link to database cannot be established: SQLSTATE[HY000] [1045] Access denied for user 'myusername'@'46.242.244.204' (using password: YES) at line 127 in file classes/db/DbPDO.php 122. public function connect() 123. { 124. try { 125. $this->link = $this->getPDO($this->server, $this->user, $this->password, $this->database, 5); 126. } catch (PDOException $e) { 127. throw new PrestaShopException('Link to database cannot be established: ' . $e->getMessage()); 128. } 129. 130. $this->link->exec('SET SESSION sql_mode = \'\''); 131. 132. return $this->link; 1. I delete the cache in var 2. I change mysql names in parametrs.php 3. I disabled SSL in mysql PS_SSL_ENABLED ans PS_SSL_EVERYWHERE Edited May 23, 2023 by ZiBiahar (see edit history) Link to comment Share on other sites More sharing options...
El Patron Posted May 23, 2023 Share Posted May 23, 2023 what do you have for localhost in parametrs.php? you mentioned you changed name, did the pwd change? I do not think ssl has anything to do with this Link to comment Share on other sites More sharing options...
Mediacom87 Posted May 23, 2023 Share Posted May 23, 2023 Hi, Your error has nothing to do with the SSL of your server, this problem is simply related to the fact that access to your database is impossible. As previously mentioned, you must have an inconsistency in the app/config/parameters.php file with your new configuration. Link to comment Share on other sites More sharing options...
ZiBiahar Posted May 24, 2023 Author Share Posted May 24, 2023 (edited) <?php return array ( 'parameters' => array ( 'database_host' => '127.0.0.1', 'database_port' => '', 'database_name' => 'newdatebasename', 'database_user' => 'newdatebaseuser', 'database_password' => 'newdatebasepassword', 'database_prefix' => 'ps_', 'database_engine' => 'InnoDB', 'mailer_transport' => 'smtp', 'mailer_host' => '127.0.0.1', 'mailer_user' => NULL, 'mailer_password' => NULL, 'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'ps_caching' => 'CacheMemcache', 'ps_cache_enable' => false, 'ps_creation_date' => '2020-10-16', 'locale' => 'pl-PL', 'use_debug_toolbar' => true, 'cookie_key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'cookie_iv' => 'mrxIxx5n', 'new_cookie_key' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', ), ); Edited May 24, 2023 by ZiBiahar (see edit history) Link to comment Share on other sites More sharing options...
Mediacom87 Posted May 24, 2023 Share Posted May 24, 2023 It is difficult to answer you, you are the one who must know the configuration and the uses of your local server. On the other hand, do you have the right PHP version on this local server? Link to comment Share on other sites More sharing options...
ZiBiahar Posted May 24, 2023 Author Share Posted May 24, 2023 (edited) Both are on the same PHP version. Edited May 24, 2023 by ZiBiahar (see edit history) Link to comment Share on other sites More sharing options...
Mediacom87 Posted May 24, 2023 Share Posted May 24, 2023 Personally, I never develop locally precisely to avoid any configuration difference and like that, I can be sure that what I modify will be compatible with the final configuration of the server on which my code will be used. 1 Link to comment Share on other sites More sharing options...
El Patron Posted May 24, 2023 Share Posted May 24, 2023 2 hours ago, Mediacom87 said: Personally, I never develop locally precisely to avoid any configuration difference and like that, I can be sure that what I modify will be compatible with the final configuration of the server on which my code will be used. great advice, totally agree...localhost had it's moment but one cannot really really use tools in say Dreamweaver, which has kick ass screen builders that allow one to build complex db calls, all under the covers..so we are stuck in past with helpers and writing our own db table calls..ps with it's own mysql classes...requires changing all that generated code to be compatible Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now