# stop mysql service
/etc/init.d/mysql stop
# Start to MySQL server w/o password
mysqld_safe --skip-grant-tables &
# Connect to mysql server using mysql client
mysql -u root
# Setup new MySQL root user password
mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit
# Stop MySQL Server
/etc/init.d/mysql stop
# Start MySQL server and test it
/etc/init.d/mysql start
mysql -u root -h localhost -p
1 comment:
Glad to know you found the post useful !
Ketan
Post a Comment