Recovery Password phpmyadmin #ngoprekLinux

(by:fredanthony)
http://ubuntuforums.org/showthread.php?t=227704

I know this is old but I recently ran into this issue. Here is how I resolved it:

1) Stop mysql:

Quote:
$ /etc/init.d/mysql stop

2) Make sure that all of the MySQL processes are actually stopped or killed. You can check for running MySQL processes with this command:

Quote:
$ ps waux

3) If any MySQL processes are still running, they will look similar to the following:

Quote:
2102 32523 … /bin/sh /usr/local/mysql/bin/safe_mysqld …
2102 32557 … /usr/local/mysql/libexec/mysqld –basedir= …

You can kill the processes with the kill command(Note: The second column is the Process ID or PID):

Quote:
kill -9 32523

4) Restart mysql with –skip-grant-tables:

Quote:
$ /usr/bin/mysqld_safe –skip-grant-tables

5) Open a new seesion, leave the other open as well, in the new session:

Quote:
$ /usr/bin/mysql

6) This should get you in, now:

Quote:
use mysql;

7) Once you are using the mysql database, run the following:

Quote:
UPDATE user SET Password=PASSWORD(‘alpa’) WHERE Host=’localhost’ AND User=’root’;

now quit out with quit; and then restart mysql:

Quote:
$ /etc/init.d/mysql restart

Thats it, you should now be logged in.

Tuan Pembual