Recover Mysql Root Password

Just a little linklog to a relevant page on How to Forge. Root privileges are needed. Stop service: service mysql stop Start MySQL server w/o password: mysqld_safe --skip-grant-tables & Connect to CLI client as root: mysql -u root Reset root password. Here’s the syntax for ≥v.5.7.6. mysql> use mysql; mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD("newpass"); mysql> flush privileges; mysql> quit Repeat step 1, or killall mysqld if it doesn’t work. [Read More]