InMotion Hosting Support Center

Errors in programs and databases can occur quickly and mysteriously. If something disasterous happens such as your admin account being deleted, it will seem imposible for your to fix as you need to get into the administrative area to troubleshoot or promote another user account to the Administrative role. In cases like this, you need to create an emergency admin account. This cannot be done through normal means and will need to be done with direct database interaction. Below is a guide on how to insert an admin account into your OpenCart 1.5 database.

  1. First, log into your cPanel account.
  2. From the main cPanel area, locate and find the Databases category, then click on the phpMyAdmin tool icon.
  3. Look to the left hand sidebar and click on the database name for your OpenCart installation. If you are unsure about the name, you can discover it by following these instructions.
  4. Once the database information loads into the right hand panel, look to the top tab menu, locate the SQL tab and click on it.
  5. Here is the SQL query editor. From here, we will enter some code that will create a new admin account for you. Below is the code to create a new admin account named admin123 and with the password admin.
    (9999,1, 'admin123', '21232f297a57a5a743894a0e4a801fc3', '',
    'firstname', 'lastname', '', '',
    Feel free to change the 'firstname', 'lastname', and '' data to anything you like as they should be obvious and are not crucial to getting you into the application. Do not change any of the other fields, however.
  6. Click on the Go button to activate the query and add the record.
  7. You will get a success message indicating the row was added. You can now test the user by logging into your OpenCart administrative area with the username admin123 and the password admin.
Was this article helpful?
Continued Education in Course OpenCart
You are viewing Section 4: 346: How to add an Admin account in OpenCart 1.5 via MySQL
Section 3: 347: Enabling email alerts within OpenCart 1.5
Section 5: 333: Adding a manufacturer to the banner in OpenCart 1.5

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved. Please click the button below to be redirected to the login page.

n/a Points
2016-11-11 9:43 am

I've tried adding a new OpenCart user in v in the SQL doing the above, but I get a "Unexpected Token" Red cross error - any ideas?

2,858 Points
2016-11-11 10:24 am
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
n/a Points
2016-02-09 8:46 am


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


I am using opencart and upgraded from 1.5.6.

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




10,883 Points
2016-02-09 10:47 am
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?
n/a Points
2015-08-13 5:05 am

Open cart 2 has extra field "code" so use:INSERT INTO oc_user VALUES(9999,1, 'username', '21232f297a57a5a743894a0e4a801fc3', '','firstname', 'lastname', 'emailaddress', ' ',' ','',1,CURDATE());

31,445 Points
2015-08-13 12:32 pm
Hello Abigail,

Thank you for sharing this information.

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

Thank you,
n/a Points
2014-10-08 2:29 am

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? 


43,761 Points
2014-10-08 7:21 am
Hello John,

As long as you have access to the email address you inserted, you can just follow the instructions for the forgotten password link to have it change that. Then you should be able to get in.

Kindest Regards,
Scott M
n/a Points
2014-10-08 10:43 am

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?


42,596 Points
2014-10-08 10:53 am
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.
n/a Points
2014-09-22 6:14 pm

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?

42,596 Points
2014-09-22 6:51 pm
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.

Arnel C.
n/a Points
2014-09-22 7:12 pm

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.

11,186 Points
2014-09-22 7:26 pm
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.
n/a Points
2014-09-22 7:29 pm

It was worth a shot. Thanks guys.

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

15 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!