I just installed MySQL on Ubuntu and the root user can\'t log in :)
How can I recover or find out my password? Using blank for password does not work.
For RHEL-mysql 5.5:
/etc/init.d/mysql stop /etc/init.d/mysql start --skip-grant-tables mysql> UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root'; mysql> FLUSH PRIVILEGES; mysql> exit; mysql -uroot -pnewpwd mysql>