How to Reset Your Database When You are Locked out of Admin

Have you been locked out of your Build A Niche Store (aka BANS) site and are unable to have your password emailed to you? It has happened to me, too. I wrote my own instructions on how to fix this because I wanted to resolve this problem as quickly as possible and it was quicker for me to do it than email BANS support and wait for Adam to fix it.

In the seven months I’ve been using BANS I have created 12+ sites and been locked out of my Admin three times. I don’t know why it happens (I’ve read that the program RoboForm may cause this and I do use RoboForm so perhaps that is the culprit) but never have I lost my store’s contents from this lockout. Some people have written on the BANS forum that they fear there is a bug in BANS causing this that will also delete their stores. I don’t think that will happen, but if you are truly frightened of losing your sites go back them up. It’s a good habit to get into if nothing else.

Before I go any further with my instructions on how to resolve this yourself I want to state up front that this requires you to go into your database and make some changes there. Your database is where your store’s information is stored. If this gets messed up then all the work you’ve put into your store will disappear.

Have I scared you enough yet? Good. You should take this seriously. Whether you decide to resolve this on your own or log a ticket with the BANS support is up to you. Regardless of which way you choose to fix this problem you should backup your database first. That way any problems that arise from fixing the log in problem can be easily reversed. You can read my instructions on how to backup your database here.

I use HostGator so the instructions and images are for this host. If you use a different host then your steps may differ slightly to get to your database but once you are in your database your steps will be the same.

 

My instructions to reset your database when you are locked out of Admin:

Step One
  Log in to your hosting site’s cPanel.
   
  Scroll down to find the MySQL Databases icon and link:
Image of MySQL Databases icon and link
  Click on either the icon or link to go to the MySQL Database page on your hosting site.
Step Two
  Scroll all the way to the bottom of the page to find the phpMyAdmin link:
Image of phpMyAdmin link
  Click the phpMyAdmin link. This will open a new tab or window and takes you to your databases.
Step Three
  Locate the database you need to reset on the left and click on it:
Image of database names
  Put a checkmark next to options and click the options icon (the icon immediately to the right of options):
Image of options for selected database
  Look at the username, password, and email areas:
Image of username, password, and email for selected database
  Most likely all are empty. Or, all but the password are empty and the password probably doesn’t look anything like what you entered for your password.
   
  Put a checkmark in the box and click the pencil icon:
Image of where to put a checkmark and what icon to click
  Enter the following information in the Value column:
 
  • For v1.x BANS sites enter your username, password, and email. If the password section is already filled but it isn’t your password then delete what’s there and enter your password.
  • For v2.x BANS sites enter just your email
Image of where to put a checkmark and what icon to click
  Scroll to bottom of page. Choose ‘Save‘ and ‘Go back to previous page‘ in the drop down menus, then click the Go button:
Image of what options to choose
  You are now done with editing your database. Log out of phpMyAdmin by clicking the ‘Exit‘ icon:
Image of the Exit icon
  If you site is a v1.x store then you are done. If your site is a v2.x or higher store then continue to the next step.
Step Four
  Go to your site’s Admin log in page. Click the ‘I forgot my password‘ link and enter your email address. Your site will generate a new password and email it to you. You will now be able to log in using the new password. You can keep the new password or you can change it. You are now done and, hopefully, able to log in to your site’s Admin.
   
  View your site to make sure there are no errors.
.

If there are errors you can restore your database (you did back it up before starting this, right?) by reading my instructions here.

Rochelle



2 Responses to “How to Reset Your Database When You are Locked out of Admin”

  1. Rochelle says:

    I want to add something Pip (a BANS forum moderator) stated on the forum about these instructions: “I do have one suggestion: Step 7, v2 sites: enter your username as well as email, and then there’s no need to go through the forgotten password routine. So long as you’ve remembered your password correctly, you will have admin access immediately. ”

    Thanks, Pip!

  2. Michelle says:

    Thank you so much for this Rochelle, I dugg your instructions on Digg. I’ve been locked out before and I just deleted the site and reuploaded it this will help if it ever happens again. Your blog is so helpful.

Leave a Reply