Jump to content

Grave problema! sito blocca!problemi di accesso alle categorie e ai prodotti error exeption database


agwork

Recommended Posts

questo è l errore:

[PrestaShopDatabaseException]

Access denied for user 'm143405d1'@'%' to database 'm143405d1'
 

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 >= 109
                                                    AND c.nright <= 414
                                                    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 765 in file classes/db/Db.php

 

760.             WebserviceRequest::getInstance()->setError(500, '
 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
761.         }
762.         elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
763.         {
764.             if ($sql)
765.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
766.
767.             throw new PrestaShopDatabaseException($this->getMsgError());
768.         }
769.     }
770.
Link to comment
Share on other sites

  • 9 months later...

Hi!

 

The problem is that your mysql has insufficient privileges to create temporary tables and, possibly, some others.

You can check this from phpmyadmin by running the following query: SHOW GRANTS;

 

 

If you have all necessary permissions the output should be like:

Grants for yourusername_pshop@% GRANT USAGE ON . TO 'yourusername_pshop'@'%' IDENTIFIED BY PASSWORD 'YOURPASSWORDHASH' GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON yourusername_pshop.* TO 'yourusername_pshop'@'%'

 

In my case I was missing privileges to create temporary tables [!!! if you look at your error you can see that the SQL query tries to create temporary table in memory (ENGINE=MEMORY), but indeed you do not have this permission and get access denied error]

 

Hope it helps

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