I have uninstalled the Mysql server using the below from my Ubuntu 12.04:

```
sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean
rm -rf /var/lib/mysql
rm -rf /etc/mysql*

```

During the installation, I entered the new root password from the prompt window.

After the installation, I am NOT able to login with the new root password, it works for the old one.

```
mysql -u root -p

```

I get the error after I enter the new password:

```
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

```

But it works fine when I enter the old password.

Also, when I log into Mysql with the old root password, I can see the table mysql.user still available as below. I need to remove the Mysql completely.

```
mysql>select host,user from mysql.user;

```

Why this happen? Is it a bug? How can I remove mysql and everything (including root logins, etc.) completely? Please advise.

Thanks.