Jump to content

Need help restoring a shop from a backup (mysql dump)


Recommended Posts

Hello,

I'm having a hard time restoring a shop's backup onto my local computer using Mamp

Both my computer and the web server have the same PHP Version 5.6.40 and MYSQL mysqlnd 5.0.11-dev

I edited the settings.inc.php file and the shop_url table to match the local domain and physical uri

When i try to reach the local install i get these errors :

[PrestaShopDatabaseException]

Expression #1 of ORDER BY clause is not in SELECT list, references column 'prestashop_restore.c.level_depth' which is not in SELECT list; this is incompatible with DISTINCT

SELECT DISTINCT c.id_parent, c.id_category, cl.name, cl.description, cl.link_rewrite
                FROM `ps_category` c
                 INNER JOIN ps_category_shop category_shop
        ON (category_shop.id_category = c.id_category AND category_shop.id_shop = 1)
                LEFT JOIN `ps_category_lang` cl ON (c.`id_category` = cl.`id_category` AND cl.`id_lang` = 1 AND cl.id_shop = 1 )
                LEFT JOIN `ps_category_group` cg ON (cg.`id_category` = c.`id_category`)
                WHERE (c.`active` = 1 OR c.`id_category` = 1)
                 AND `level_depth` <= 4
                AND cg.`id_group` IN (1)
                ORDER BY `level_depth` ASC, category_shop.`position` ASC

 

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

634. 			WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
635. 		}
636. 		elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
637. 		{
638. 			if ($sql)
639. 				throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
640. 			throw new PrestaShopDatabaseException($this->getMsgError());
641. 		}
642. 	}
643. 
644. 	/**

 

Any help is welcome

Thanks

Link to comment
Share on other sites

  • 2 weeks later...

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...