Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    316
    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..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    316
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. SebastianC

    SebastianC Active Member

    Joined:
    Nov 25, 2003
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    151
    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:
    51
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice