SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Change MySql Password

    Hi all,
    I am trying to change the root password for Mysql but everytime I try what is says in the manual it just gives me Query Ok, 0 Rows affected
    I am using this:
    but it's on about starting mysql with --skip-grant-tables option ( I don't know if I did that right?)
    Code:
    shell> mysql -u root mysql
    mysql> UPDATE user SET Password=PASSWORD('new_password')
        ->             WHERE user='root';
    mysql> FLUSH PRIVILEGES;
    Can anyone give me a link to a tutorial of how to do this. I am using a downloaded version of mysql from phpdev and windows 2000, if that makes any difference.
    I also want to be able to set up 2 users on it. An administrator that can add/edit/delete records and a general user that will be able to add items to a cart table and edit their own details.
    Does anyone know how to do this, or can they again recommend a tutorial?
    Thanks!

  2. #2
    SitePoint Evangelist cyngon's Avatar
    Join Date
    Aug 2001
    Location
    Livonia, MI, USA
    Posts
    513
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It seems to me that what you tried should have worked.

    The way you are supposed to do it is:

    Code:
    shell> mysqladmin -u root -p password NewPassword
    It will then prompt you for your old password. After you enter it it will change your password to NewPassword.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2002
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It worked! I don't know how because I tried to log on as root and the new password and it wouldn't let me.
    But last night when I was testing out my code I still had the old password typed in the connection, and it wouldn't connect, put in my new password and it did!
    Thanks anyway!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •