This question already has an answer here:
Ok, so I changed my password through phpMyAdmin and it's completely locked out my access to the root mysql user. There are various articles about this online, but none of them seem to work. Here's what i've tried so far:
Stop the mysql service: sudo /etc/init.d/mysql stop
Start with this option: sudo mysqld --skip-grant-tables &
Start mysql prompt: mysql
Enter following at mysql prompt:
UPDATE mysql.user SET Password=PASSWORD('newpass') WHERE User='root'; FLUSH PRIVILEGES; exit;
This is all working fine, but I cannot connect using the new password, i'm not sure exactly what the problem is.
Any help is much appreciated.