fosiul01
asked on
mysql -u root is not asking for password
Hi
i have checked 2 databases.
One of them if i type mysql -u root , it will say Acess denyed
another one will take you to mysql console, which i guess is not right,
but cant figured out why this is giving trouble..
i have checked, i dont have any account with empty password.
mysql> select Host,User from mysql.user where password = '';
Empty set (0.00 sec)
mysql> select Host,user from mysql.user;
+------------------------- -+------+
| Host | user |
+------------------------- -+------+
| 127.0.0.1 | root |
| localhost | root |
| mail.xxxxx.co.uk | root |
+------------------------- -+------+
3 rows in set (0.00 sec)
then why its entering to mysql without password??
PS: from normal user accoutn if type, mysql -u root , it will say access denyed, but if i login as root user, it would not ask for password,
what i am missing??
i have checked 2 databases.
One of them if i type mysql -u root , it will say Acess denyed
another one will take you to mysql console, which i guess is not right,
but cant figured out why this is giving trouble..
i have checked, i dont have any account with empty password.
mysql> select Host,User from mysql.user where password = '';
Empty set (0.00 sec)
mysql> select Host,user from mysql.user;
+-------------------------
| Host | user |
+-------------------------
| 127.0.0.1 | root |
| localhost | root |
| mail.xxxxx.co.uk | root |
+-------------------------
3 rows in set (0.00 sec)
then why its entering to mysql without password??
PS: from normal user accoutn if type, mysql -u root , it will say access denyed, but if i login as root user, it would not ask for password,
what i am missing??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ohh i know why
in home directory of root, for some reason , there is a file call .my.cnf!!!
dont understand why.. it might be webmin did that
in home directory of root, for some reason , there is a file call .my.cnf!!!
dont understand why.. it might be webmin did that
ASKER
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock