I clicked on forgot password link and wrote my email but the server didn't send any information regarding password to my mail-id.I have used the following query which causes an error .Please rectify the error..
UPDATE 'ps_employee'
SET 'passwd' = md5(“<3w3kuJFFAMFB4zUR19aTDvbnomepQJFTd60NUCns5HDtqf9mEkv6APFy><samyak02>”)
WHERE 'email' = “<abhijain.cse@gmail.com>”;
where, 3w3kuJFFAMFB4zUR19aTDvbnomepQJFTd60NUCns5HDtqf9mEkv6APFy
is the cookie_key in settings.inc.php and samyak02
is the new password I want to set.
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''ps_employee' SET 'passwd' = md5(“<3w3kuJFFAMFB4zUR19aTDvbnomepQJFTd60NUCns5HD' at line 1
You need to:
Cheers
The correct query is:
UPDATE `ps_employee`
SET `passwd` = md5('3w3kuJFFAMFB4zUR19aTDvbnomepQJFTd60NUCns5HDtqf9mEkv6APFysamyak02')
WHERE `email` = 'abhijain.cse@gmail.com';
3w3kuJFFAMFB4zUR19aTDvbnomepQJFTd60NUCns5HDtqf9mEkv6APFy is your _COOKIE_KEY_ from /config/settings.inc.php
samyak02 is the new password.
abhijain.cse@gmail.com is the email address of the Employee you want to change password.
If you have phpMyAdmin it's even easier:
PS: Your table might be named something other than ps_employee, like brg_employee or r23r_employee. It depends what prefix your prestashop has. Again, this is found in the settings.inc.php
PS2: For your learning process I recommend taking a look at the SQL-query that show up after you click GO when inside PhpMyAdmin. It's a great tool to learn SQL syntax.
As everybody can see the resetting admin password via SQL execution is very hard for the most of users and they make mistakes when performing this task and do not understanding what they doing.
So, if there no way to recover a password by default recovery form the easiest way is to recover password by this free tool for PrestaShop, because, no knowledge is required about database and programming. Required the access to a site folder, for example, FTP access or the web access to an admin panel with file manager.
How to use.
prestashop-password-recovery-tool.php
file to the root of your PrestaShop installation directory.http://example.com/prestashop-password-recovery-tool.php
, where example.com
is your site domain. You will see the form to input your admin e-mail and a new password.This tool is also compatible with ThirtyBees (the fork of PrestaShop).