I installed LAMP on Ubuntu 12.04 LTS (Precise Pangolin) and then set root password on phpMyAdmin. I forgot the password and now I am unable to login. When I try to chan
In my case it worked by doing some R&D:
I am able to connect to MySQL using
root-debian#mysql -h 127.0.0.1 -u root -p
But it's not working with mysql -u root -p
.
I did not find any bind-address
in my.cnf. So I outcommented the parameter socket=/var/lib/mysql/mysqld.sock
in my.cnf
which was causing me a problem with login.
After restarting the service it went fine:
root@debian:~# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.6.19 MySQL Community Server (GPL)