Forums / General Questions / accidentally deleted the "Admin" entry in phpmyadmin

accidentally deleted the "Admin" entry in phpmyadmin

Locked

Views: 1,283

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
15 Nov 2010, 3:53 PM
#1
rastabloke avatar

rastabloke

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

accidentally deleted the "Admin" entry in phpmyadmin

So I was unable to login to my cart with the normal credentials. I then went into phpmyadmin and noticed that the "Admin" username had been changed. -probably by the other guy who has access to the site.

While in there, I accidentally deleted the only admin entry.

Now I try to run

DELETE FROM admin WHERE admin_name = 'Admin';
INSERT INTO admin (admin_name, admin_email, admin_pass, admin_level)
VALUES ('Admin', 'admin@localhost', '351683ea4e19efe34874b501fdbf9792:9b', 1);

But there is no "Admin" in there.

When looking at the database, I still see zen_admin. But now when I click on it, it returns an "empty result set".

Can someone provide a script to run that will populate "admin" with basic information? Like username: admin Password: admin

Thanks :)

15 Nov 2010, 5:31 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: accidentally deleted the "Admin" entry in phpmyadmin

When looking at the database, I still see zen_admin. But now when I click on it, it returns an "empty result set".

Try this as I have added your DB prefix

DELETE FROM zen_admin WHERE admin_name = 'Admin';
INSERT INTO zen_admin (admin_name, admin_email, admin_pass, admin_level)
VALUES ('Admin', 'admin@localhost', '351683ea4e19efe34874b501fdbf9792:9b', 1);

Zen-Venom Get Bitten

15 Nov 2010, 5:44 PM
#3
rastabloke avatar

rastabloke

New Zenner

Join Date:
Dec 2008
Posts:
45
Plugin Contributions:
0

Re: accidentally deleted the "Admin" entry in phpmyadmin

OMG, I can't believe I didn't see that!!

You genius, me NOT!!

:lamo: