?
Solved

restoring password

Posted on 2003-10-29
9
Medium Priority
?
473 Views
Last Modified: 2008-03-17
hi ,

somebody hacked into my mysql database and changed my password to the mysql admin....
is there some way to retrieve it without loosing my whole database??

i have about a gigabite of information there which is backed up but without password i can't manage it....
when trying to access threw php admin the error message is "Access denied for user: 'root@localhost' (Using password: NO)"


Thanks for a quick answer

Peter
0
Comment
Question by:funkytaz10
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 17

Expert Comment

by:Squeebee
ID: 9644166
"(Using password: NO)"

If you do not provide a password the NO will appear. Was you previous password no password? If not then it did not make it to MySQL.

Anyway, to change your password kill all mysql processes so the server is not running, then start the server with the --skip-grant-tables directive to disable password checking. Then switch to the mysql database and issue:

UPDATE user SET password = PASSWORD('newpassword') WHERE user = 'root';
FLUSH PRIVILEGES;

And you will have a new password for root.
0
 

Author Comment

by:funkytaz10
ID: 9644453
thanks for the answer....

i forgot to mention that this mysql database is used for a invision power board on a windows xp computer with MINI portal from instantservers as server...

so there is the big difficulty...

sorry

Peter
0
 
LVL 17

Expert Comment

by:Squeebee
ID: 9644497
Is MySQL in your process list?
0
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

 

Author Comment

by:funkytaz10
ID: 9644650
yes... the forum is working but we can't change things any more...

0
 
LVL 17

Expert Comment

by:Squeebee
ID: 9644758
That is not what I asked, if you go to the task manager and switch to your process list do you have a mysqld process listed?
0
 
LVL 8

Accepted Solution

by:
heskyttberg earned 750 total points
ID: 9657163
Hi!

Ok, first check this link so you get a understanding of how to do this:
http://www.mysql.com/doc/en/Resetting_permissions.html

Then since you are in windows right click on mysql service choose properties and stop the mysql service.
In the dialog box at the bottom, where it sais something like startup parameters, write in the following:
--skip-grant-tables
Start the service!

start a cmd shell, I assume mysql is installed in c:\mysql:
c:
cd \mysql\bin
mysql -u root mysql
in the mysql prompt do this:
update user set password = password('mynewpassword') where user = 'root';
quit

Now stop the mysql service, remove the startup parameters.
Start the service again.

Now you can login as root in your mysql database, this is the superuser and with this user you can change any other users password.
If the admin user you are talking about is a user a admin user for a bbs software, you need to consult the documentation for that software as how to reset such a
password, since that user is most likely not a mysql db user.

Now you should be able to login with your new password.

Regards
/Hasse

0
 

Expert Comment

by:MorganStanley
ID: 9897903
Does this restoring work also when root was deleted?
So by any chance any kind of user name?

Regards,

Balázs
0
 
LVL 8

Expert Comment

by:heskyttberg
ID: 9904630
Hi!

I'm not sure, most likely it should be able to do this for any user.

Regards
/Hasse
0
 

Expert Comment

by:MorganStanley
ID: 9904655
Yeah, this is good for any user. Thanks!

B.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question