Mysql root password reset on Ubuntu

Spread the love

Stop mysql service

sudo /etc/init.d/mysql stop

Start without password

sudo mysqld_safe --skip-grant-tables &

Connect to Mysql

mysql -uroot

Reset password

use mysql;

update user set password=PASSWORD("passwordgoeeshere") where User='root';

flush privileges;

quit

Restart mysql

sudo /etc/init.d/mysql stop
sudo /etc/init.d/mysql start
Facebook Comments

Published by

Titus Choi

I love technology. Working for information technology. Interested in AVR technology. Playing with RC stuff.