Mysql password reset

Discussion in 'Server Operation' started by newbie14, Feb 11, 2011.

  1. newbie14

    newbie14 New Member

    Dear All,
    I have lost my root password so I am trying to reset and following steps I have run but failed. Any help please? Thank you.

    service mysqld stop
    Stopping MySQL: [ OK ]
    [root@localhost /]# mysqld_safe --skip-tables-grants
    nohup: ignoring input and redirecting stderr to stdout
    Starting mysqld daemon with databases from /var/lib/mysql
    STOPPING server from pid file /var/lib/mysql/localhost.localdomain.pid
    110212 05:12:19 mysqld ended

    [root@localhost /]# mysql -u root
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
     
  2. falko

    falko Super Moderator

  3. newbie14

    newbie14 New Member

    Dear Falko,
    What I did was first I stop by this command service mysqld stop. Then I ran this mysqld_safe --skip-grant-tables. The problem it gave me the output below and just thats all kept there. Can I type in the empty space below where the last line?
    nohup: ignoring input and redirecting stderr to stdout
    Starting mysqld daemon with databases from /var/lib/mysql
     
  4. falko

    falko Super Moderator

    Yes, that should work.
     

Share This Page