Thoughts on “346: How to add an Admin account in OpenCart 1.5 via MySQL

  • I’ve tried adding a new OpenCart user in v 2.0.1.1 in the SQL doing the above, but I get a “Unexpected Token” Red cross error – any ideas?

    • Sam, the instructions in this article only apply to OpenCart 1.5. In version 2.0 OpenCart had major updates and changes, and this makes the instructions above not relevant for other versions of OpenCart. You may wish to ask about this in the OpenCart forums at https://forum.opencart.com/

  • Hello,

    Please I added the code and got this feedback, #1136 – Column count doesn’t match value count at row 1

     

    I am using opencart 2.0.2.0 and upgraded from 1.5.6.

    We have lost permissions to make any changes at the back office. Kindly help us.

     

    Thanks.

    Dornu

    • Where are you seeing the error you mentioned? When you say you lost permissions do you mean you can’t log in? Or are you seeing a different error to indicate you don’t have the necessary permissions?

  • Open cart 2 has extra field “code” so use:
    INSERT INTO oc_user VALUES
    (9999,1, ‘username’, ‘21232f297a57a5a743894a0e4a801fc3’, ”,
    ‘firstname’, ‘lastname’, ’emailaddress’, ‘ ‘,’ ‘,
    ‘0.0.0.0’,1,CURDATE());

    • Hello Abigail,

      Thank you for sharing this information.

      If you have any further questions, feel free to post them below.

      Thank you,
      John-Paul

  • Thanks for the speedy response Scott, unfortuantely I have tried to reset my password. It says it works but it still refuses to let me log in. I have checked the database through phpMyAdmin and all seems ok, and yet I am still locked out. Is there anything else a person can try?

     

    • Hello John,

      Sorry for the problems with the login. If you are unable to get your password working through the automated options, then you will need to contact live support. They can change it for you very quickly once your account information has been verified. You can reach live support through phone/email/chat .

      Kindest regards,
      Arnel C.

  • I followed the instructions, recieved the all ok. Checked the DB and the user was there but the login and pass did not work. Anything else I can try? 

     

  • Arnel, thanks for the quick reply. I’m not a InMotion customer, but just looking for someone that can help.

    It’s an Aceshop v1.4.6 installation (Opencart v1.5.1.3 within Joomla). I have a bunch of vqmod additions but didn’t think they would matter for basic top admin access and the template is a standard opencart release.

    I’m not sure what the cause was as I hadn’t made any changes to permissions, but I found myself locked out. I reset the password via phpmyadmin, but am only able to access the dashboard and denied access to everything else. I’m not super familiar with opencart sql so am not quite sure what I’m doing when it comes to editing permissions.

    • As this is not just a standard OpenCart installation, some things may not be the same as a typical OpenCart installation. Your best solution may be to contact the developer of Aceshop for more information on performing the changes that you need to make.

  • I added the prefix so to query the right table, but I still get an error saying “#1136 – Column count doesn’t match value count at row 1”.

    Any ideas?

    • Hello Dave,

      Sorry for the problem. Can you provide us any account details (if you’re a customer with InMotion), or can you provide any information on the installation – version of OpenCart, plugins, or themes. We need more information in order to investigate the issue.

      Regards,
      Arnel C.

Leave a Reply