How to Reset a Lost MySQL Password

  mysqld --skip-grant-tables &
  mysql -h 127.0.0.1 mysql
    1 GRANT ALL PRIVILEGES ON * TO root@localhost IDENTIFIED BY 'password';
    2 FLUSH PRIVILEGES;
    3 GRANT ALL PRIVILEGES ON * TO root@localhost IDENTIFIED BY 'password';
    4 FLUSH PRIVILEGES;
    5 QUIT;

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.

More information about formatting options