#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    64
    Rep Power
    16

    MySQL password problems NOT root


    Hi,

    Im setting up a Linux server with MySQL running under mandrake 9.2. I need to be able to change the username and password for one of the databases because I appear to have forgotten it (although I'm positive the password im using is the one i set it up with :s)

    I set the like this... "grant all privilges on beerfest.* to beerfest@localhost identified by beerFEST2004;"

    It doesn't let me access or drop the table (ideally I'd like to just drop the whole db and start again, but when I reinstall MySQL the db and password are still there). I'm not a Linux person and am not confident with it. I want to manually delete the db but am scared it'll muck up properly.

    I have stopped running the server using the GUI services window. I then try to start the server up with as follows...

    $mysql --skip-grant-tables

    ...which works okay and starts up the server. I then try and use mysqladmin to set the password to something else as follows...

    $mysqladmin -u beerfest password 'newpass'

    ...and I get the follwing error:

    "unable to change password; error; 'You must have privileges to update tables in the mysql database to be able to change the password for others"

    Does anyone have any idea how I can change the password of beerfest???

    Cheers.
  2. #2
  3. kill 9, $$;
    Devshed Supreme Being (6500+ posts)

    Join Date
    Sep 2001
    Location
    Shanghai, An tSín
    Posts
    6,878
    Rep Power
    3891
    When you log in as root and enter the"GRANT ALL PRIVILEGES . . . " statement, you should follow it with: FLUSH PRIVILEGES;
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    64
    Rep Power
    16
    thanks alot! Just the ticket

IMN logo majestic logo threadwatch logo seochat tools logo