SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    Your daddy. WALoeIII's Avatar
    Join Date
    Apr 2001
    Location
    USA
    Posts
    526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Changing MySQL user passwords

    How do I change the password for the root user on MySQL? I know how to change it for other people and users I add, but I'd like to change the root password on my devlopment machine.

  2. #2
    epsilon transition cupid's Avatar
    Join Date
    Aug 2001
    Location
    Kent, Ohio
    Posts
    367
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm.. how are you doing it? What errors are you receiving?

    Code:
    shell> mysql -dUSERNAME -p mysql
    mysql> update user set password=password('password_here') where user='root';
    That should work.. Remember to reload mysql after performing this.

  3. #3
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or use the mysqladmin program:

    mysqladmin -u root -p password NEWPASSWORD

    Next you will be prompted for the OLD password. Enter it - and you should be done.

  4. #4
    Your daddy. WALoeIII's Avatar
    Join Date
    Apr 2001
    Location
    USA
    Posts
    526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Argh

    Well thats all and good, it works, but I forgot to mention that I can't get to the command prompt, I'm trying to change it on my local computer, with apache/php/mysql installed on my windows 2000. I tried to telnet into localhost but I was denied a conection, how do I get in to change this?

  5. #5
    SitePoint Guru prequel's Avatar
    Join Date
    Nov 1999
    Location
    Brisbane, Australia
    Posts
    682
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    open an MSDOS window and do it from there


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
  •