Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Recover a Password

 
   Database Help (Home) -> mySQL RSS
Next:  Source for Paradox 4.5 DOS & SQL Link  
Author Message
chuy

External


Since: Feb 14, 2005
Posts: 3



(Msg. 1) Posted: Mon Feb 14, 2005 11:37 am
Post subject: Recover a Password
Archived from groups: mailing>database>mysql (more info?)

Is there a way to recover a lost password in Mysql 4.1. I have seen many
articles and howto's on how to kill the Mysql process and then restart using
skip grant tables option. I am not trying to reset the password but rather
recover it. Resetting the password to something else would cause a problem
some of the underlying programs that rely on MySQL. I don't feel like
changing code for every application that is using MySQL in my site.

Also along similar lines. What if I were to kill the MySQL process and then
reload with the skip grant tables option and login to the MySQL server.
Could I create another account with root priviledges, such as admin, while
not messing with the original root account or it's password.

Lastly is there a way to copy just the grant tables information to another
copy of MySQL so that I can experiment with this process on a non production
box? Any help appreciated.

Running MySQL 4.1 PHP 4.3 Apache 2.0 on Redhat 9.0

 >> Stay informed about: Recover a Password 
Back to top
Login to vote
Bill Karwin1

External


Since: Jun 17, 2004
Posts: 42



(Msg. 2) Posted: Mon Feb 14, 2005 12:22 pm
Post subject: Re: Recover a Password [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

chuy wrote:
 > Is there a way to recover a lost password in Mysql 4.1.

MySQL 4.1 passwords are encrypted using a one-way 41-bit hashing
function. Passwords are not reversible.
See <a rel="nofollow" style='text-decoration: none;' href="http://dev.mysql.com/doc/mysql/en/password-hashing.html." target="_blank">http://dev.mysql.com/doc/mysql/en/password-hashing.html.</a>

 > Resetting the password to something else would cause a problem
 > some of the underlying programs that rely on MySQL. I don't feel like
 > changing code for every application that is using MySQL in my site.

If there are programs that use the old password to log into the root
account, couldn't you recover the password by reading the code for those
programs? Smile

 > Could I create another account with root priviledges, such as admin, while
 > not messing with the original root account or it's password.

Yes, you could create another user with privileges to everything.
See example of creating superusers on
<a rel="nofollow" style='text-decoration: none;' href="http://dev.mysql.com/doc/mysql/en/adding-users.html" target="_blank">http://dev.mysql.com/doc/mysql/en/adding-users.html</a>

 > Lastly is there a way to copy just the grant tables information to another
 > copy of MySQL so that I can experiment with this process on a non production
 > box? Any help appreciated.

AFAIK, you should be able to back up the mysql database just like any
other. Then restore it on your test system. I haven't done this
operation myself, though. So if there's some restriction against this,
I don't know.

Regards,
Bill K.

 >> Stay informed about: Recover a Password 
Back to top
Login to vote
chuy

External


Since: Feb 14, 2005
Posts: 3



(Msg. 3) Posted: Mon Feb 14, 2005 12:49 pm
Post subject: Re: Recover a Password [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The password is located in an encrypted PHP script that is using ioncube for
dencryption. When I use the VI editor on the file I get a bunch of garbage.
Are you saying that is I am using Mysql 4.0 then I could get at the
password. To be sure I am unable to verify the actual version of MySQL
being used.

Upon further review I am inclined to say that 4.0 is being used as the PHP
version is onlyl 4.3 and the passwords seem to get passed on properly. On a
different server I use MySQL 4.1 with PHP 4.3 and no dice regarding
passwords unless I save password using old password line from within the
Mysql window.

In any event suppose I am using MySQL 4.0 or Mysql 4.1 with old passwords
would I then be able to recover them? Thanks

"Bill Karwin" wrote in message

 > chuy wrote:
  >> Is there a way to recover a lost password in Mysql 4.1.
 >
 > MySQL 4.1 passwords are encrypted using a one-way 41-bit hashing function.
 > Passwords are not reversible.
<font color=purple> > See <a rel="nofollow" style='text-decoration: none;' href="http://dev.mysql.com/doc/mysql/en/password-hashing.html.</font" target="_blank">http://dev.mysql.com/doc/mysql/en/password-hashing.html.</font</a>>
 >
  >> Resetting the password to something else would cause a problem some of
  >> the underlying programs that rely on MySQL. I don't feel like changing
  >> code for every application that is using MySQL in my site.
 >
 > If there are programs that use the old password to log into the root
 > account, couldn't you recover the password by reading the code for those
 > programs? Smile
 >
  >> Could I create another account with root priviledges, such as admin,
  >> while not messing with the original root account or it's password.
 >
 > Yes, you could create another user with privileges to everything.
 > See example of creating superusers on
<font color=purple> > <a rel="nofollow" style='text-decoration: none;' href="http://dev.mysql.com/doc/mysql/en/adding-users.html</font" target="_blank">http://dev.mysql.com/doc/mysql/en/adding-users.html</font</a>>
 >
  >> Lastly is there a way to copy just the grant tables information to
  >> another copy of MySQL so that I can experiment with this process on a non
  >> production box? Any help appreciated.
 >
 > AFAIK, you should be able to back up the mysql database just like any
 > other. Then restore it on your test system. I haven't done this
 > operation myself, though. So if there's some restriction against this, I
 > don't know.
 >
 > Regards,
 > Bill K.
 >> Stay informed about: Recover a Password 
Back to top
Login to vote
chuy

External


Since: Feb 14, 2005
Posts: 3



(Msg. 4) Posted: Mon Feb 14, 2005 12:56 pm
Post subject: Re: Recover a Password [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Upon further review the version is actually 3.23.58.


"chuy" wrote in message

 > Is there a way to recover a lost password in Mysql 4.1. I have seen many
 > articles and howto's on how to kill the Mysql process and then restart
 > using skip grant tables option. I am not trying to reset the password but
 > rather recover it. Resetting the password to something else would cause a
 > problem some of the underlying programs that rely on MySQL. I don't feel
 > like changing code for every application that is using MySQL in my site.
 >
 > Also along similar lines. What if I were to kill the MySQL process and
 > then reload with the skip grant tables option and login to the MySQL
 > server. Could I create another account with root priviledges, such as
 > admin, while not messing with the original root account or it's password.
 >
 > Lastly is there a way to copy just the grant tables information to another
 > copy of MySQL so that I can experiment with this process on a non
 > production box? Any help appreciated.
 >
 > Running MySQL 4.1 PHP 4.3 Apache 2.0 on Redhat 9.0
 >
 >> Stay informed about: Recover a Password 
Back to top
Login to vote
Bill Karwin1

External


Since: Jun 17, 2004
Posts: 42



(Msg. 5) Posted: Mon Feb 14, 2005 2:22 pm
Post subject: Re: Recover a Password [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

chuy wrote:
 > In any event suppose I am using MySQL 4.0 or Mysql 4.1 with old passwords
 > would I then be able to recover them? Thanks

No. Passwords in earlier MySQL versions are still not reversible,
they're just encrypted with a shorter hashing function. You should read
the web pages I referred you to.

You're saying you have only the encrypted version of the PHP scripts,
and not the original source? I'd consider that a problem, for more
reasons than recovering the MySQL password.

Regards,
Bill K.
 >> Stay informed about: Recover a Password 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Best way to issue hundreds of inserts/updates??? - Using mysql 4.0.23- What is the best way to execute several (hundreds of) inserts and updates? Rather than issuing tons of individual inserts and updates, can I send the strings to a text file and then have mysql do them all?? IE : query.txt insert..

MySQL freezes, brings XP machine to a grinding halt - I've been using MySQL for a while for fairly light database development on my XP machine. Currently, I am just starting a new project and have experienced some big problems with MySQL today both on my office machine and at home where running a particular...

login as user 'root' but do not have root privlages and my.. - Hi gang: I'm experiencing a problem with MySQL -- I updated MySQL from version 4.1.0 to 4.1.10 and now when I login as root it doesn't show all the databases I should have access to, nor it doesn't recognize me being logged in as root (via..

FLUSH TABLES hangs if table is locked - Using FLUSH TABLES via the C query API mysql_query() hangs if the table is locked already. That is to say, nothing prevents me from running a LOCK TABLES twice; it won't tell me "it's already locked, don't try to run a FLUSH". Anyone know ...

Tool to convert DDL in graphical diagram? - Does anyone know of a tool that will create a graphical diagram from a DDL (SQL create script)? Preferable a free open-source tool. Thanks, A
   Database Help (Home) -> mySQL All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]