Zen Cart Logo
Forums / General Questions / Urgent help required plz I'm desperate

Urgent help required plz I'm desperate

Locked

Views: 1,756

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
26 Nov 2007, 7:04 AM
#1
section1 avatar

section1

New Zenner

Join Date:
Oct 2007
Posts:
99
Plugin Contributions:
0

Urgent help required plz I'm desperate

Someone has changed my username and password for the admin section, I now can't access my site, how can I find out what my username and password is. I managed to email myself a password but have no clue as to what username it is.

26 Nov 2007, 7:28 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Urgent help required plz I'm desperate

Searching the Tutorials/FAQ section for "admin password" brings up this as first result:
https://www.zen-cart.com/tutorials/index.php?article=2

26 Nov 2007, 7:44 AM
#3
section1 avatar

section1

New Zenner

Join Date:
Oct 2007
Posts:
99
Plugin Contributions:
0

Re: Urgent help required plz I'm desperate

Thanks I serached everywhere but I'm pannicing so much I've gone blind I'll try this now

26 Nov 2007, 7:51 AM
#4
section1 avatar

section1

New Zenner

Join Date:
Oct 2007
Posts:
99
Plugin Contributions:
0

Re: Urgent help required plz I'm desperate

Error

SQL query:

DELETE FROM admin WHERE admin_name = 'Admin';

MySQL said: Documentation
#1146 - Table 'section1.admin' doesn't exist

26 Nov 2007, 7:53 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Urgent help required plz I'm desperate

Do all your table names start with a certain prefix? You'll have to pre-pend the prefix to your statements:

DELETE FROM table_prefix_admin ...
INSERT INTO table_prefix_admin ...

26 Nov 2007, 7:56 AM
#6
section1 avatar

section1

New Zenner

Join Date:
Oct 2007
Posts:
99
Plugin Contributions:
0

Re: Urgent help required plz I'm desperate

IO'm sorry I don't understand can you give me a visual sample

26 Nov 2007, 7:58 AM
#7
section1 avatar

section1

New Zenner

Join Date:
Oct 2007
Posts:
99
Plugin Contributions:
0

Re: Urgent help required plz I'm desperate

Error

SQL query:

DELETE FROM table_prefix_admin DELETE FROM admin WHERE admin_name = 'Admin';

MySQL said: Documentation
#1064 - 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 'DELETE FROM admin WHERE admin_name = 'Admin'' at line 1

26 Nov 2007, 8:03 AM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Urgent help required plz I'm desperate

section1:

IO'm sorry I don't understand can you give me a visual sampleUm, I thought that's what I posted.

DrByte:

Do all your table names start with a certain prefix?You didn't answer this question.

If they do, then you'll need to insert that prefix before the word "admin" in the SQL code from the tutorial ... as mentioned in the tutorial.

DrByte:

You'll have to pre-pend the prefix to your statements:

DELETE FROM table_prefix_admin ...
INSERT INTO table_prefix_admin ...
In this example, "table_prefix_" would be a sample prefix.

26 Nov 2007, 8:11 AM
#9
section1 avatar

section1

New Zenner

Join Date:
Oct 2007
Posts:
99
Plugin Contributions:
0

Re: Urgent help required plz I'm desperate

Ok I am so confused right now that I was responding to you in my sql. How about I give you my username and password for my sql because I have no idea of a table is and prefix

26 Nov 2007, 8:13 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Urgent help required plz I'm desperate

Another angle.

Open your /includes/configure.php file.
Look for the line that says:```
define('DB_PREFIX', 'something-here');

26 Nov 2007, 8:15 AM
#11
section1 avatar

section1

New Zenner

Join Date:
Oct 2007
Posts:
99
Plugin Contributions:
0

Re: Urgent help required plz I'm desperate

'zen_');

26 Nov 2007, 8:16 AM
#12
section1 avatar

section1

New Zenner

Join Date:
Oct 2007
Posts:
99
Plugin Contributions:
0

Re: Urgent help required plz I'm desperate

define('DB_PREFIX', 'zen_')

26 Nov 2007, 8:22 AM
#13
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Urgent help required plz I'm desperate

Okay, so, take the tutorial code: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);and add your table-prefix according to the guide:```
DELETE FROM table_prefix_admin ...
INSERT INTO table_prefix_admin ...

Thus, the modified tutorial code would become:```
DELETE FROM [B]zen_[/B]admin WHERE admin_name = 'Admin'; 
INSERT INTO [B]zen_[/B]admin (admin_name, admin_email, admin_pass, admin_level) 
VALUES ('Admin', 'admin@localhost', '351683ea4e19efe34874b501fdbf9792:9b', 1);
26 Nov 2007, 8:28 AM
#14
section1 avatar

section1

New Zenner

Join Date:
Oct 2007
Posts:
99
Plugin Contributions:
0

Re: Urgent help required plz I'm desperate

you legend that worked!!!:clap::clap::
Ok I now have two admins should I delete them both

26 Nov 2007, 8:34 AM
#15
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Urgent help required plz I'm desperate

section1:

Ok I now have two admins should I delete them both

The FAQ article answers that question too:> After you log in, remember to delete this temporary admin account and create a new one from Admin->Tools->Admin Settings

26 Nov 2007, 8:34 AM
#16
section1 avatar

section1

New Zenner

Join Date:
Oct 2007
Posts:
99
Plugin Contributions:
0

Re: Urgent help required plz I'm desperate

thank you again and again and again.:clap::hug: