Solved

restoring password

Posted on 2003-10-29
9
472 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

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 250 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

Do you have a plan for Continuity?

It's inevitable. People leave organizations creating a gap in your service. That's where Percona comes in.

See how Pepper.com relies on Percona to:
-Manage their database
-Guarantee data safety and protection
-Provide database expertise that is available for any situation

Question has a verified solution.

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

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 series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

707 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