Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts

Wednesday, October 7, 2009

Reset Root password MySQL

Steps for the resetting root password of the MySQL database user.

# /etc/init.d/mysql stop
# /usr/bin/mysqld_safe --skip-grant-tables --user=root
# mysql -u root
update mysql.user SET password=PASSWORD('newpasswd') where User='root';
flush privileges;

# kill `cat /var/run/mysqld/mysqld.pid`
# /etc/init.d/mysql restart
# mysql -u root -p