Jump to content

Prestashop Database Exception (Server Migration)


Recommended Posts

Hello

 

I have copied my website and database onto a new server, changed the DB name, user, passwords and shop url to the new settings. I've tried a few times, deleting and re-uploading the sites and database but to no avail. 

 

The debug mode is turned on and I see this main error.

 

[PrestaShopDatabaseException]

The database selection cannot be made.
at line 54 in file classes/db/MySQL.php

 

More details on the error can be seen here: http://casualfashionninja.com/

 

When I try to access the backend, it says

 

Link to database cannot be established: SQLSTATE[HY000] [1044] Access denied for user 'exampleuser'@'localhost' to database 'example_database'

 

I'm quite certain the DB credentials in /config/settings.inc.php is correct, but I may have overlooked something. Thank you for any tips and advise!

Link to comment
Share on other sites

[PrestaShopDatabaseException]

Access denied for user 'cl33-realhair'@'%' to database 'cl33-realhair'

 

CREATE TEMPORARY TABLE ps_cat_restriction ENGINE=MEMORY

                                                    SELECT DISTINCT cp.id_product, p.id_manufacturer, product_shop.condition, p.weight FROM ps_category_product cp

                                                    INNER JOIN ps_category c ON (c.id_category = cp.id_category AND

                                                    c.nleft >= 21

                                                    AND c.nright <= 22

                                                    AND c.active = 1)

                                                    INNER JOIN ps_product_shop product_shop ON (product_shop.id_product = cp.id_product

                                                    AND product_shop.id_shop = 1)

                                                    INNER JOIN ps_product p ON (p.id_product=cp.id_product)

                                                    WHERE product_shop.`active` = 1 AND product_shop.`visibility` IN ("both", "catalog")

at line 791 in file classes/db/Db.php

 

786. if ($webservice_call && $errno) {

787. $dbg = debug_backtrace();

788. WebserviceRequest::getInstance()->setError(500, '

 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);

789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {

790. if ($sql) {

791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');

792. }

793.

794. throw new PrestaShopDatabaseException($this->getMsgError());

795. }

796. }

Link to comment
Share on other sites

That's what I'm getting when I try accessing categories via Top Horizontal Menu, but when I'm on my local server its working perfect. What could be the problem?

 

The error says "access denied"....

Access denied for user 'cl33-realhair'@'%' to database 'cl33-realhair'
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...