Jump to content

Forgot mysql ROOT password

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
20 replies to this topic

#1
Guest_Wanch_*

Guest_Wanch_*
  • Guests
It isn't on a machine that clients use but on a local machine I have for messing around with. The problem is I can't remember what the root user password is for MySQL.


# mysql -u root -p


ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)


Anyone know how to reset this password?

#2
Guest_Jordan_*

Guest_Jordan_*
  • Guests
Ah, I've been there before. MySQL Manual has a great reference on how to do it for both Linux and Windows:

MySQL :: MySQL 5.0 Reference Manual :: B.1.4.1 How to Reset the Root Password

Let me know if you need any help.

#3
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
That's bad mate. Did you solve it?

#4
Guest_SexYLinuX_*

Guest_SexYLinuX_*
  • Guests
Don't you think that having the functionality of resetting the password can compromise security?

#5
Tor

Tor

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 486 posts
I think it can but if someone can gain root access to your system your security is already gone anyway.

#6
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
True. Because that means that they already hacked you...

#7
Guest_SexYLinuX_*

Guest_SexYLinuX_*
  • Guests
Hmm.. no I mean if the hack the database server, can't they hack the root account and gain root access on the database?

#8
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
I've got no idea if that is possible.

#9
HappyUser

HappyUser

    Learning Programmer

  • Members
  • PipPipPip
  • 40 posts
Unless you hack the root user I don't think you will be able to hack his databases....right?

#10
Guest_Jordan_*

Guest_Jordan_*
  • Guests
In MySQL you set where people are allowed from. Most users are set to only access MySQL via localhost. Unless you have setup bad security permissions and have allowed users to access MySQL from any IP then you could risk being hacked.

#11
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
So the only way to access it from localhost would mean that they have to hack your root, right?

#12
Tor

Tor

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 486 posts
I believe so.