The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

commandline like "Reset Local MySQL Root Password" in whm

Discussion in 'General Discussion' started by gundamz, Sep 24, 2005.

  1. gundamz

    gundamz Well-Known Member

    Joined:
    Mar 27, 2002
    Messages:
    245
    Likes Received:
    0
    Trophy Points:
    16
    Hi,

    I need to know the code on how to hard reset mysql password, just like what "Reset Local MySQL Root Password"(found in whm) do

    the mysql change password script found in /scripts/ is just change password. it will not fix mysql.sock & *.pid problem if it is missing..
     
  2. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    San Clemente, Ca
    this is for linux, with bsd some of the paths to things may be diffrent...

    /etc/init.d/mysql stop
    mysqld_safe --skip-grant-tables &
    mysql mysql -e "update users set password=PASSWORD('THE NEW PASS GOES HERE') where user='root';"
    killall -9 mysqld_safe
    killall -9 mysqld
    vi /root/.my.cnf and replace password next to pass= with your new password
    /etc/init.d/mysql start
     
  3. SebastianC

    SebastianC Active Member

    Joined:
    Nov 25, 2003
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Hello:

    I have the next error:

    ERROR 1146 (42S02) at line 1: Table 'mysql.users' doesn't exist

    This is since I upgrade MySQL 4 to 4.1, and now I can't access phpMyAdmin from WHM, and users can't view their databases inside cpanel, but they can view them in phpMyAdmin.

    Any idea?
     
  4. esteban

    esteban Registered

    Joined:
    Sep 20, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    An old post, but hope this may help in future forum searchs:

    the table "users" become "user" in mysql database, then replace the step

    mysql -e "update users set password=PASSWORD('THE NEW PASS GOES HERE') where user='root';"

    with

    mysql -e "update user set password=PASSWORD('THE NEW PASS GOES HERE') where user='root';"
     
Loading...

Share This Page