If the password for the mysql “root” user is lost, it’s still possible reset it to some other value.
The restart of the mySQL server will be necessary, of course.
The following should be done:
Stop the server
It could be done normally:
or effectively:
...
mysql 25079 1 0 Jan 31 ? 0:00 /usr/bin/mysqld
...
kill -9 25079
Please ensure that the proper process is killed!
Start MySQL server without security checking
Connect to mySQL without password
Reset mySQL root password
Use the real new password instead of the string “NEW_PASSWORD”.
Restart mySQL server
/etc/init.d/mysql start
Check the connection
Leave a Reply