#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Posts
    4
    Rep Power
    0

    setting root password


    I have been trying to set my root password for days now and am having no luck. I always come up that i do not have privileges.'

    please help!

    [localhost:/usr/local] root# kill -9 611
    [localhost:/usr/local] root# kill -9 625
    [localhost:/usr/local] root# ps aux | grep mysql
    root 653 0.0 0.0 5724 72 std RV 0:00.00 grep mysql
    [localhost:/usr/local] root# cd /usr/local
    [localhost:/usr/local] root# ./bin/safe_mysql --user=mysql --skip-grant-tables &

    OK? ./bin/safe_mysqld --user=mysql --skip-grant-tables &? yes
    [1] 654
    [localhost:/usr/local] root# Starting mysqld daemon with databases from /usr/local/var

    [localhost:/usr/local] root# ./bin/mysqladmin -u root password mysql77
    ./bin/mysqladmin: unable to change password; error: 'You must have privileges to update tables in the mysql database to be able to change passwords for others'
    [localhost:/usr/local] root#
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    North Vancouver, BC, Canada
    Posts
    44
    Rep Power
    17

    Try


    I am testing this on windows but the same should work in Linux/Unix.

    1. I shutdown mysqld with my password:

    C:\mysql\bin>mysqladmin -u root -p shutdown
    Enter password: ******

    2. I start mysqld.

    C:\mysql\bin>mysqld --skip-grant-tables

    3. I login into mysql with no password just an enter when asked.

    C:\mysql\bin>mysql -u root -p mysql
    Enter password:

    Welcome to the MySQL monitor. Commands end with ; or \g.
    Your MySQL connection id is 1 to server version: 3.22.34-shareware-debug

    Type 'help' for help.
    4. I update the root password with:
    mysql> update user set password=password('blank') where user='root';
    Query OK, 2 rows affected (0.11 sec)
    Rows matched: 2 Changed: 2 Warnings: 0

    mysql> exit
    Bye

    Shutdown and restart mysqld to remove the skip grants and
    test out.

    Hope this helps.
    Thanks

    Foot in Mouth ver 1.2.5 Onion
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2001
    Posts
    4
    Rep Power
    0

    muchas gracias


    foot in mouth

    thank you so much!

    It actually worked!!

    I may rest in peace now.

    Peace

IMN logo majestic logo threadwatch logo seochat tools logo