I cannot figure out my MySQL root password; how can I find this out? Is there any file where this password is stored?
I am following this link but I do not have dir
I solved this a different way, this may be easier for some.
I did it this way because I tried starting in safe mode but cannot connect with the error: ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
What I did was to connect normally as root:
$ sudo mysql -u root
Then I created a new super user:
mysql> grant all privileges on *.* to 'myuser'@'%' identified by 'mypassword' with grant option;
mysql> quit
Then log in as myuser
$ mysql -u myuser -p -h localhost
Trying to change the password gave me no errors but did nothing for me so I dropped and re-created the root user
mysql> drop user 'root'@'localhost;
mysql> mysql> grant all privileges on *.* to 'root'@'localhost' identified by 'mypassword' with grant option;
The root user is now working with the new password