Resetting the mySQL root user’s password
Follow the process, to Set the root user’s password for mySQL Which is different from the root (system) user:
#/usr/bin/mysqladmin -u root password ‘new-password-here’
If you get “Access denied” for root@localhost try this method:
Stop mysqld:
#service mysqld stop
or
#/etc/init.d/mysqld stop
Start it with:
#/usr/libexec/mysqld –skip-grant-tables –user=mysql
Log onto another terminal or SSH session and run:
#mysql -u root mysql
Enter password:
#mysql> UPDATE user SET Password=PASSWORD(‘newpasswordhere)
-> WHERE User=’root’;#mysql> FLUSH PRIVILEGES;
#mysql> exit
Then test with:
#mysql -u root -p
Advertisement
Leave a Comment