How to reset MySQL root password ?


Download as PDF

What happens if you forget your MySQL root password ?. Actually its very simple to reset, below are the steps to achieve that,

  • First you have to kill all the mysqld instances that are currently running,
  • [root@host root]#killall mysqld
  • Now start the mysql daemon as below,
  • [root@host root]#/usr/libexec/mysqld -Sg –user=root &
  • You may also try the below command,
  • mysqld –skip-grant-tables –user=root