need to recover database pw
In an attempt to make certain I know my database's password, I've changed it (in MySQLadmin) to something other than what I used to install ZenCart. Anyone know how to retreive that password? It's present as a field in the db but hashed, which doesn't help.
Re: need to recover database pw
The password you've configured Zen Cart to use is stored in your /includes/configure.php file.
If you change the database password, you'll need to change it in the configure.php file too.
Re: need to recover database pw
Quote:
Originally Posted by
cyberbaffled
In an attempt to make certain I know my database's password, I've changed it (in MySQLadmin) to something other than what I used to install ZenCart. Anyone know how to retreive that password? It's present as a field in the db but hashed, which doesn't help.
Hashed passwords cannot be recovered (it is a one way hash).
It is a little unclear (to me) exactly which password you wish to recover though. DrByte has already indicated where you can find the MySQL database username/password (stored in plain text) that was used when you first installed zencart, but if you've changed this via an SQL admin tool (as you have stated) then these plain text entries won't do you any good, and because there is no way to recover what you changed it to, the only thing to do would be to reset it once again.
On the other hand, I can also imagine that the " field in the db but hashed" that you are referring to could also be the zencart admin password (which isn't the same as the database user password), in which case, you still can't recover it, but you can use the 'forgotten password' function of zencart to reset it.
If the username/password specified by DrByte is indeed the one you wish to 'recover' then please feel free to ignore my input, I am clearly over thinking the problem. If however this isn't the info you wish to recover then as stated, recovery isn't possible. Another reset is your only option.
Cheers
Rod
Re: need to recover database pw
Dr Byte, thanks again for your rapid response. RodG, apparently your comment that I must "reset it once again" is pertinent, but I don't understand what you mean by that phrase. The loss of link from my browser to the Zen Cart application occured when I used the "edit" function in MySQL admin to change the db password. Apparently I changed it to something other than what I had previously installed into the config.php file. So I noted the password in the config.php file and then returned to the aforementioned "edit" utility and changed the db password to what I had noted in the config file. Didn't help; which I think is what RodG predicted. So RodG's subsequent comment, that I must "reset it once again" is what describes the situation; but I don't understand what that phrase means. Thanks again for your attention to this self-inflicted injury, so to speak.
Re: need to recover database pw
TWO SCENARIOS:
If YOU are talking about the MySQL password for the DATABASE then:
He probably means that you need to pick a new password, and enter that in your MySQL screen, whatever that is ... as well as put it into your two configure.php files.
ie: tell your database what new password you want to use, and then tell Zen Cart what that new password is.
The password in the Zen Cart configure.php files is not hashed. There's no need to unhash it.
If YOU are talking about the password field in the "admin" table inside your database, then:
- as RodG says, this password is hashed, and you cannot retrieve that value from the database
- But then you'd have no reason to "be certain you know the password" because you'd clearly already be using that password when you login to your store's admin section.
- If indeed you ARE talking about that password, then you can reset it by using the "Forgot Password" link on the login screen
- If you are unable to use that for some reason, you can do a forced reset using these instructions: https://www.zen-cart.com/tutorials/index.php?article=2
But none of this should be necessary whatsoever, given that you already had the admin login password as evidenced by your own ability to login to your store's admin area ... which is why I made the assumption that your confused jargon was referring to the database as a whole, in my first reply.
Re: need to recover database pw
Yes, DrByte, it's the first scenario. I changed the db password using the "edit" function in MySQLadmin and thereafter linking to the cart site produced a can't open (or find) browser message. Therefore, I reviewed what password I had used on installation -located in the config.php file- and returned to MySQLadmin and using "edit" changed the dp password to what is in the config file. Thereafter, the browser continues to generate the same can't open error message. I hadn't structured the cart yet with products, etc., so there's no great penalty for repeating the entire install process. But for future referrence it would be great to learn the cause and quick solution to the problem.
Re: need to recover database pw
I've already explained the cause of the problem.
So, now if you've nothing in your site that you can't afford to wipe out, do a fresh clean install of Zen Cart. This time use the official installation process, via zc_install. You will be required to supply your MySQL database username and password and database-name to complete the installation. You will of course then have all of that information on-hand and won't need to mess around in the database anymore.
Re: need to recover database pw
Quote:
Originally Posted by
cyberbaffled
RodG, apparently your comment that I must "reset it once again" is pertinent, but I don't understand what you mean by that phrase.
It's rather simple, you already changed it once
"I've changed it (in MySQLadmin)" which has apparently caused your problem. All you need do (in theory) is change it once again (using the same method as before), but this time, take note of what you've changed it to and then enter the same username/password into the two zencart config files.
Quote:
Originally Posted by
cyberbaffled
The loss of link from my browser to the Zen Cart application occured when I used the "edit" function in MySQL admin to change the db password.
This is bad terminology. What do you mean by "loss of a link".
There is no connection/relationship between a mysql password and and links to the store.
Quote:
Originally Posted by
cyberbaffled
Apparently I changed it to something other than what I had previously installed into the config.php file. So I noted the password in the config.php file and then returned to the aforementioned "edit" utility and changed the db password to what I had noted in the config file. Didn't help;
Can we back up a little here please.. Exactly what table and database did you find/edit this password? Was it the zencart database, or the mysql users database?
As a general rule this question wouldn't need to be asked (in relation to zencart issues), but some of your comments and terminology could imply that you have indeed been messing with the mysql database called 'mysql' (In fact it is THIS database that the zencart configure.php entries are related to.
If you are referring to the zencart database (and the password in the table named "admin") then you are referring to the admin login for zencart itself. This entry has *nothing* to do with the DB entries in the zencart configure files.
Quote:
Originally Posted by
cyberbaffled
Thanks again for your attention to this self-inflicted injury, so to speak.
As usual, I find myself agreeing with DrBytes' advice. It appears that you are a new zencart user and as such there is probably nothing in your store that you can't afford to wipe out, as such you may be best served by doing a fresh install and treating this as an educational experience of something you shouldn't do.
Even if you DO know what the plain text password is that you need, trying to do manual edit into the database in its hashed format isn't exactly straightforward, unless you also know the hashing mechanism being used (encypt, des-encrypt, SHA1, 'password', 'old_password' are just some of the possibilities.
Bottom line is that MySQL passwords are designed to be secure and not easily manipulated/modified via normal editing methods, which is why no one can give you a simple solution to the situation you have created for yourself.
Having said that, it *is* possible to recover from this situation, but based on the currently known facts, a fresh install is probably the best, easiest and quickest solution *for you*.
Cheers
Rod
Re: need to recover database pw
I did a fresh install, leading to a fresh problem. Please see my new thread regarding a php bug foiling opening of the admin dashboard. This looks like something a php programmer could get their proverbial teeth into.