473,394 Members | 1,769 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Recover a Password

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
Jul 23 '05 #1
4 2677
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 http://dev.mysql.com/doc/mysql/en/password-hashing.html.
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? :-)
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
http://dev.mysql.com/doc/mysql/en/adding-users.html
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.
Jul 23 '05 #2
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" <bi**@karwin.com> wrote in message
news:cu*********@enews4.newsguy.com...
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 http://dev.mysql.com/doc/mysql/en/password-hashing.html.
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? :-)
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
http://dev.mysql.com/doc/mysql/en/adding-users.html
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.

Jul 23 '05 #3
Upon further review the version is actually 3.23.58.
"chuy" <ch****@yahoo.com> wrote in message
news:11*************@corp.supernews.com...
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

Jul 23 '05 #4
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.
Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: BadBob | last post by:
I installed a new application and it over wrote my passwords. I can not get back in to mysql. Someone suggested there is a way to set the password without knowing the old password. Can anyone help...
5
by: Prem K Mehrotra | last post by:
I come from Oracle background. In Oracle, when one wants to do a point in time recovery, one can specify recover database until timestmap. Oracle's database maps to a db2 subsystem, i.e., in...
2
by: Maellic | last post by:
Hi, I'm currently updating a website written with ASP.NET. The original programmer is overseas, there is no documentation, and files are all over the place. Here is a code snippet from one of...
2
by: David | last post by:
Hi, It's easy, visit http://www.ccsoftcn.com and download Access Password Recover 1.62 to help you. Can receive the correct password within 1 second. Can change or clear password for the...
2
by: Mike Boothe | last post by:
I am using OE6. Instead of using the Main Identity, I'm using another one; it helps cut down the spam. Somehow it switched back to the Main Identity (I didn't fiddle with it) and the other is...
2
by: Ofer | last post by:
Hi, We use the ASP.net loginControls and the DB schema. How to programmatically activate the "PasswordRecovery" of a specific end-user when a user clicks my web application's button? I need to...
3
by: Killer42 | last post by:
Hi all. Some months back, I had some Windows problems and ended up having to reinstall XP Pro on a new drive. Since then I have recovered most of my old files from the old drive, and deleted lots...
0
by: MillerPr | last post by:
Hi I would like to know if there is an an easy way to recover the entire SQL string sent to the SQL server built using ADO adparam methods. I need to recover and assign to a variable the entire...
1
by: kbrci | last post by:
We used software from a now defunct company for many years and all of our data is stored in an access database. Two years ago our software was updated, but we never burned the new version to disk....
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.